Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SYS(3050, 1, 0) Returns Negative Number
Message
 
To
21/09/2011 12:47:35
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01524074
Message ID:
01524243
Views:
56
>>Have a brand new machine running Windows 7 64 Bit with 8 Gig or RAM.
>>
>>Have used the statement SYS(3050, 1, VAL(SYS(3050,1,0))/3) for allocating Memory for years without a problem. Also runs OK on Win 7 both 32 & 64 Bit machines with 4 Gig of Memory.
>>
>>Have read on Wik: i http://fox.wikis.com/wc.dll?Wiki~sys3050 that the old 1/3 trick doesn't work on machines with more than 6 Gig or RAM.
>>
>>Also see that SYS(3050,1,0) returns a negative number on my 8 Gig machine.
>>
>>Any suggestions anyone?
>
>If value is negative, what about adding 2^32 to it? I presume what is happening is that return value is being interpreted as a signed integer rather than unsigned, and adding 2^32 to it should "fix" the value.

Thanks Naoto..looks like you nailed it...when I add 2^32 to my value, indeed I get the same result as Al & Naomi..

Marshal
Previous
Reply
Map
View

Click here to load this message in the networking platform