Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set century
Message
 
 
To
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:
01013488
Views:
12
>
>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
>
You're right. How can we fix that? Do we need a special code for year 1999?
>* 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
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform