Re: [Tutor] String formatting hex numbers

2009-05-30 Thread Alan Gauld
"Tony Cappellini" wrote sys.stdout.write( "\r%-8s ... 0x%08X->0x%08X " % ( descr, long(startAddr), long(endAddr) ) Why are these displayed with a leading negative sign (between the 0x and the actual number)- as seen below? 0x-1BFFF400 to 0x-1BFFF000 Because they are negative values and th

[Tutor] String formatting hex numbers

2009-05-30 Thread Tony Cappellini
I was looking at a this code which uses this code to dsiplay some hex numbers sys.stdout.write( "\r%-8s ... 0x%08X->0x%08X " % ( descr, long(startAddr), long(endAddr) ) The hex values are in this range 0x1BFFF400 to 1BFFF000 Why are these displayed with a leading negative sign (between the 0x a