Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Line of code that works yet shouldn't
Message
De
04/07/2007 06:42:10
 
 
À
04/07/2007 00:50:15
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:
01237712
Vues:
15
Hi Tom

>Hi Terry,
>>I agree. I just wasn't sure what the originator was trying to acheive.
>
>Just try to put "&&" in front of the uncertain "*" and it should be clear <g>.
>
>I have had to straighten out some programs really run into ground by idiotic maintainance -

TELL ME ABOUT IT!

>and some were not great from the start.

TELL ME ABOUT IT!

>But the first rule for me is: current code is always right.
>It is the code running at the customers, it made it through testing and if it is not in synch with
>doc or spec I will make a note of it and ask for which is correct.

He's not around any more, is getting on a bit in age now, has so many progs that he can't remember them (written c. 1993-5)

>
>As in your case the SQL would fail if the "*" were meant as a comment make it as readable to YOU as possible.
>If you are working alone on a clunker, as first action flag the version you take over on your Source Ccontrol version,
>beautify to your needs and flag again as your first version (if not working with source control consider using your laptop
>or make loud noises). Change things looking ambiguos to YOUR eyes to a form easyly grokable to you everytime you encounter them.

Tom, thank you for the lesson in version control, documentation of change and prog maintenance. ;-)

>
>I have often used the analogy of setting the steering wheel and drivers chair into the position fitting for the current driver as an example why I need half a day as a setup for taking over large projects. If the car really is a clunker, there is need for even further inspection (brake and traffic lights for instance) before trying to cross the continent...

But if it's a posh BMW or Merc then a mere press of a button will adjust programmed individual wheel and driver's seat position! :-)

>
>As this is a fringe case not helped by syntax coloring, change away.

I just realised, as this was written in FPD26 he wouldn't have had the luxury of syntax colouring that would have flagged the ambiguity to him. As far as he was concerned the code looked fine. Anyway, we've ascertained it works OK - just looks weird.

Cheers

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