Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set century
Message
From
12/05/2005 12:26:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013353
Message ID:
01013485
Views:
10
CLEAR

set century TO 19 ROLLOVER 55   && default

?SET("century",2)  &&55

***************** FABIO *************
* Attention, next have a 1..100 range, but rollover's range is 0..99
lnyear=VAL(RIGHT(DTOC(DATE()),2))+1

* Doc
* SET CENTURY ON | OFF | TO [nCentury [ROLLOVER nYear]]

set century ON at this point the Parser ignored anythings
***************** FABIO END ****************

set century ON TO 19 ROLLOVER lnyear    

?SET("century",2)   && still 55, why?

for i=1 to 10
	?ctod('01/01/'+ transform(m.i))  && rollover 6 does not work
NEXT

set CENTURY TO 19 ROLLOVER lnyear

?SET("century",2)   && now it is 6, because of ON was removed?
for i=1 to 10
	?ctod('01/01/'+ transform(m.i))   && rollover 6 works
NEXT

* Try with ON again
set CENTURY ON TO 19 ROLLOVER lnyear 

?SET("century",2)     && it is 6 however, why?
for i=1 to 10
        ?ctod('01/01/'+ transform(m.i))  && rollover 6 works, and with ON !?
NEXT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform