Re: length of an ascii file [message #7710] |
Thu, 02 January 1997 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
R. Bauer wrote:
>
> Hi,
>
> I like to read ascii files at once, therefore I need to know how much
> bytes are in the file.
>
Use the fstat function.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
[ UCSD Mail Code 0949 ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|
Re: length of an ascii file [message #7714 is a reply to message #7710] |
Mon, 30 December 1996 00:00  |
Phil Williams
Messages: 78 Registered: April 1996
|
Member |
|
|
Here's something that should work.
function file_size, filename
openr, lun, filename, /get_lun
stats = fstat(lun)
free_lun, lun
return, stats.size
end
--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
|
|
|