Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ctod() weirdness
Message
De
14/08/2015 15:20:41
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
14/08/2015 12:02:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01623085
Message ID:
01623417
Vues:
46
>>>>ROLLOVER, if not defined, goes to (YEAR(DATE())+50)%100
>>>>even if, at your place, it goes to 0 as one could read out of the help (but to me it means only at version 5) , this will change in 35 years.
>>>>What is the return of
>>>>
>>>>?SET("Century"),SET("Century",1),SET("Century",2)
>>>>
>>>>on your comp?
>>>
>>>ON, 19, 50
>>>
>>>But then I don't have any preferred settings for this (unless... well, I had both
>>>CENTURY =OFF
>>>century=on
>>>in my config.fpw, I guess the latter works). Whenever I need to import data from some weird .csv or tab delimited files, I set these things for the occasion, using the old EnvLib.prg objects. I simply can't rely on having any defaults, as the apps I work on are used in several countries, so any local settings will apply and my defaults are irrelevant.
>>
>>After VFP 5.0 SET CENTURY ON / OFF should only deal with the display and calculation of two digit years. (Note section of help)
>>The strange thing is, ROLLOVER (SET("Century",2)) should be 65 by default, since we have xx15. Century (SET("Century",1)) should be 19 becuase we are in the lower half of 20xx
>>
>>If you do
>>
>>SET CENTURY TO
>>?SET("Century"),SET("Century",1),SET("Century",2)
>>
>>is the output the same?
>
>Nope, now I'm getting
>ON 19 65

That's strange. Shure you do not anything else with SET CENTURY on startup? Because 19 50 means the 50 needs to be set somehow.
What happend if you create a numb private form and put into init event:
?SET("Century"),SET("Century",1),SET("Century",2)
SET CENTURY TO
?SET("Century"),SET("Century",1),SET("Century",2)
and run the form?
because that is what should be default.

BTW, Hilmar seems to have twitted me. Possibly you can hint him that all the stuff when SET CENTURY switches to what century and rollover is within HELP SET CENTURY? It's a bit awkward written, but by simply running some test one can figure it out.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform