negative numbers in file-info

Notices and updates
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

negative numbers in file-info

Post by cormullion »

I noticed today that I'm getting negative numbers in file-info:

Code: Select all

(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:

Code: Select all

(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.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

The underlying OS function queried for this info reports the size as a signed 32-bit number.

Lutz

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

... now that newLISP handles 64-bit size files this should probably reported differently, I have put it on my to-do list.

Lutz

Locked