Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan endscan break
Message
De
17/12/2007 18:40:39
 
 
À
17/12/2007 17:12:21
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:
01276370
Vues:
27
>>>well... the 'goto' is not a proper command on structable programing.. But, how this one is a matter of logic.. The better decision up to you.. You're getting the view of all task..
>>
>>Your assertion that "GO TO..." is not "a proper command on structable programing" is incorrect.
>>
>>A "GO TO" that redirects code to another place for execution is what is unacceptable in structured programming.
>>
>>VFP's "GO TO" simply moves the record pointer, which is perfectly acceptable in structured programming. Just as the use of EXIT is fine in sturctured programming.
>>
>well.. it really depends.. I'm talking about clarity/intelligibility.. in a past goto represent leak of clarity on the logic as others stuffs for a programing team.. This is what I meant.. This is what represent a VFP's procedure full of goto 5, goto 4978, skip + 10, skip -10, etc... Only the author will deal fine with that one..
>
>
To each his own.

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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform