Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date/Time Build EXE Problem
Message
De
07/03/2013 11:46:04
 
 
À
07/03/2013 10:56:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01567712
Message ID:
01567747
Vues:
38
>>To me it seems like a very odd compile-time bug.
>Why do you consider it a bug?

The compiler should let any valid or invalid encoding go through because the encoding is determined by usage at runtime. I can do:
k = "dTest = {01/01/20}"
&k
At runtime it will either work or not based on the strictdate setting.


>It's pretty clear that it is telling you that you have used dates that are ambiguous.
>You then have the option of changing a compile time switch to allow them or not.

Consider this:
Create a file called myfile.prg:
* myfile.prg
SET STRICTDATE TO 0
dTest = {01/01/2020}
From the command prompt type:
SET STRICTDATE TO 0
compile myfile.prg
* Compiles with no error

SET STRICTDATE TO 1
compile myfile.prg
* Compile error

SET STRICTDATE TO 2
compile myfile.prg
* Compile error
The source code I'm compiling is valid. It would execute properly at runtime. Were I to swap out my explicit "dTest = {01/01/2020}" text above with the "k = 'dTest = {01/01/2020}'" code, and then execute "&k" in my source code it would be processed correctly.

I just think it's wrong for VFP to consider the case of the date encoding at compile time when it could be a valid encoding based on settings when that line of code is reached at runtime. I think VFP should allow that determination to be made by strictdate settings when encountered in source code at runtime, and not by whatever the machine happens to be set to at compile time.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform