Jockey2,
Sure. No special environment is set. It seems to work all the time.
Go in to FPW 2.6 and create a simple screen called "myfoo.scx". Create a single input box on the screen with the variable m.foo. In the setup / init code, use "m.foo = 0". Add a button with terminate read, and generate the SPR. It will be like the portion below.
Run it in FPW 2.6 with "do myfoo.spr" and it runs fine. Run the same in VFP9 and use these inputs:
(2^31) - 1 = 2,147,483,647 && Will work just fine
(2^31) = 2,147,483,648 && Will momentarily display a "numeric overflow" message.
The wait window message will only appear on the first input. So you'll have to exit the screen/form and restart. Once the value larger than (2^31)-1 is input, subsequent small or larger values operate correctly.
Next, you can verify that if you comment / un-comment and change the setup / init code from "m.foo = 0" to "m.foo = 0 + (9999999999 - 9999999999)" you'll see that it works fine.
Also, if you do this...
create table c:\temp\myfoo.dbf ( foo n(5,0) )
append blank
scatter memvar
...you'll note that m.foo (populated from the table, even though the table is an n(5,0) field) will also work like this without giving the message.
The "numeric overflow" message doesn't seem to affect anything. It just appears for a brief instant, and then continues. It is related to the 2^31 bit boundary, suggesting that VFP is using a 32-bit quantity for small values (more common) and when the numbers begin getting large, it switches to an alternate form of storage which, by examining the contents of the save to whatever.hex file, it appears to always be a 64-bit double floating point form, with a specified length and decimals.
Best regards,
Rick C. Hodgin
-----[ myfoo.spr ]-----
* *********************************************************
* * 05/21/2012 MYFOO.SPR 08:25:30
* *********************************************************
* * Description:
* * This program was automatically generated by GENSCRN.
* *********************************************************
#REGION 0
REGIONAL m.currarea, m.talkstat, m.compstat
IF SET("TALK") = "ON"
SET TALK OFF
m.talkstat = "ON"
ELSE
m.talkstat = "OFF"
ENDIF
m.compstat = SET("COMPATIBLE")
SET COMPATIBLE FOXPLUS
m.rborder = SET("READBORDER")
SET READBORDER ON
m.currarea = SELECT()
* *********************************************************
* * Windows Window definitions
* *********************************************************
IF NOT WEXIST("_3ia0i22x1")
DEFINE WINDOW _3ia0i22x1 ;
AT 0.000, 0.000 ;
SIZE 22.000,98.400 ;
FONT "MS Sans Serif", 8 ;
FLOAT ;
NOCLOSE ;
MINIMIZE ;
SYSTEM
ENDIF
* *********************************************************
* * MYFOO/Windows Setup Code - SECTION 2
* *********************************************************
#REGION 1
m.status = 0
**********
* Method 1, produces the message
*****
m.foo = 0
**********
* Method 2, does not produce the message
*****
*m.foo = 0 + (9999999999 - 9999999999)
**********
* Method 3, does not produce the message
*****
*set safety off
*create table c:\temp\myfoo.dbf ( foo n(5,0) )
*append blank
*scatter memvar
* *********************************************************
* * MYFOO/Windows Screen Layout
* *********************************************************
#REGION 1
IF WVISIBLE("_3ia0i22x1")
ACTIVATE WINDOW _3ia0i22x1 SAME
ELSE
ACTIVATE WINDOW _3ia0i22x1 NOSHOW
ENDIF
@ 3.769,19.600 GET m.foo ;
SIZE 1.000,44.800 ;
DEFAULT " " ;
FONT "MS Sans Serif", 8 ;
PICTURE "@K"
@ 5.538,33.600 GET m.status ;
PICTURE "@*HT Done" ;
SIZE 1.769,7.167,0.667 ;
DEFAULT 1 ;
FONT "MS Sans Serif", 8 ;
STYLE "B"
@ 1.000,9.600 SAY 'Use 2,147,483,647 or smaller to NOT produce the message.' + CHR(13) + ;
'Use 2,147,483,648 or larger to produce the "numeric overflow" message.' ;
SIZE 2.000,67.800, 0.000 ;
FONT "MS Sans Serif", 8 ;
STYLE "T"
IF NOT WVISIBLE("_3ia0i22x1")
ACTIVATE WINDOW _3ia0i22x1
ENDIF
READ CYCLE
RELEASE WINDOW _3ia0i22x1
SELECT (m.currarea)
#REGION 0
SET READBORDER &rborder
IF m.talkstat = "ON"
SET TALK ON
ENDIF
IF m.compstat = "ON"
SET COMPATIBLE ON
ENDIF