Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan endscan break
Message
De
17/12/2007 20:26:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
17/12/2007 18:40:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01276291
Message ID:
01276383
Vues:
21
>To me the GOTO command in VFP says GO TO RECORD x in the current table. I think it is just as clear as its equivalent LOCATE FOR RECNO() = x. The same is true of SKIP commands. Actually, I can't think of any equivalent command which would do what SKIP does.
>
>I admit that if I saw an undocumented GOTO 4978 I would be more than a little suspicious, but seeing SKIP 10, SKIP -10, etc. would never by itself be a sign to me that the program logic needed to be reviewed. If I put that in any code of mine (and I have) I would never suspect that a maintenance programmer would have any trouble deciphering what was going on (and AFAIK, they haven't)

Exactly - a SKIP 10 may look suspicious if I can't see why is 10 an important number in this context (trying to scroll a grid by 10 records - what if this is resized and the grid holds 5 or 25 records now, is this legacy?). Goto X is fine if I see what's x, if the variable is assigned somewhere in the nearby code (if this is after a scan/endscan, I'd look at beginning of each block, or simply search backwards). A GOTO 4978 is definitely cause for alarm, specially if the app is supposed to be delivered with empty tables :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform