newLISP Fan Club

Forum => newLISP newS => Topic started by: cormullion on November 28, 2006, 08:30:12 AM

Title: negative numbers in file-info
Post by: cormullion on November 28, 2006, 08:30:12 AM
I noticed today that I'm getting negative numbers in file-info:


(file-info "/Users/me/Documents/arch.img")
(-783613952 33188 0 501 501 1160658286 1160653047 1160653047)

I wonder why it doesn't return an unsigned decimal by default:


(set 's (first (file-info "/Users/me/Documents/arch.img")))
-783613952
> (format {%u} s)
"3511353344"


It's not a problem, now that i know, just wondered why.
Title:
Post by: Lutz on November 30, 2006, 04:29:00 PM
The underlying OS function queried for this info reports the size as a signed 32-bit number.



Lutz
Title:
Post by: Lutz on November 30, 2006, 05:08:22 PM
... now that newLISP handles 64-bit size files this should probably reported differently, I have put it on my to-do list.



Lutz