Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Line of code that works yet shouldn't
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01237329
Message ID:
01237332
Vues:
13
Hi Martina

Thanks. So you're saying that although the IDE interprets that as a comment, and syntax colours it in so, the compiler strill perceives it as "all fields", because of the ";"?

So it's a fluke that he wrote it to appear as commented out?

This is what I suspected. I don't see the need to change this other guy's code as the command DOES produce the _ergdump table. I was trying to ascertain how it worked and reassure myself that he meant that . This is the least of the mysteries of his arcane code, believe me. I'm only just scratching the surface at the mo! :-)

Terry

>Hi Terry,
>
>Change code to:
>
> select space(1) as undump,space(1) as dumpcode,;
>  _fb2.* from _fb2 where machine=='a' into table _ergdump
>
>
>
>Because char ";" tell VFP... command continues on next row.
>The char "*" tell VFP IDE, it's comment (VFP IDE Syntax Highlighing is not VFP Compiler)
>
>MartinaJ
>
>>Hi guys
>>
>>This one is a bit weird. The following line(s):
>>
>>select space(1) as undump,space(1) as dumpcode,;
>>  * from _fb2 where machine=='a' into table _ergdump
>>
>>
>>in a prog I'm altering works. But, in editor, the second line shows up in "commented out" colours, as expected. It makes no difference if I move the * to col 1.
>>
>>Now I'd've thought it either takes the * to mean "all fields in the selected table", in which case the stipulation of the other fields should cause an error, or comment out the 2nd line, which should cause an error in the first line, with continuation ";" but no continuation.
>>
>>Now I don't know what the original programmer (and I use that expression reservedly) had in mind.
>>
>>Anyone shed some light on this?
>>
>>'ppreciate it
>>
>>Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform