Len of file dat
bassmaster
Posts: 181
Any easy way to get the length of a binary file in memory when read.
DAT
···myfile file "myfile.bin"···
I can use windows explorer to get the size then hard code it, but that bites.
Sean
DAT
···myfile file "myfile.bin"···
I can use windows explorer to get the size then hard code it, but that bites.
Sean
Comments
I haven't tried it, but it ought to work.
But normally what I do is just right click on a file and read its properties.
It's pretty fast and only takes a second.
Sizeof is a pointer.
DAT
myfile file "myfile.bin"
varsize long varsize - myfile
This would do the same thing.
I'm not sure if you have to use the @ symbol though with that code since they are pointers.
DAT
myfile file "myfile.bin"
mysize long @mysize - @myfile
I haven't tried the above either, But it's a good starting point.
works perfectly... thanks...