Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progressive llRetVal check and code execution
Message
De
28/11/2005 12:35:49
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/11/2005 12:32:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01072377
Message ID:
01072513
Vues:
24
>>>Hi
>>>
>>>I have this code snippet, lots in fact, where the code goes something like this:
>>>
LOCAL llRetVal
>>>
>>>llRetVal = DODEFAULT()
>>>
>>>IF llRetVal
>>>	llRetVal = THISFORM.pgf.Page1.txtIno.CheckForBadNextNo()
>>>
>>>	IF llRetVal
>>>...
>>>	ENDIF
>>>ENDIF
>>>
>>>RETURN llRetVal
>>>
>>>Any suggestion where the code can be more linear.
>>>
>>>Or do I RETURN as soon as I get a false value?
>>>Or do I IF Condition()?
>>>
>>>Please advise.
>>
>>I don't think you need llRetVal variable.
>>
>>return ;
>> dodefault() and ;
>> THISFORM.pgf.Page1.txtIno.CheckForBadNextNo() and ;
>> ...
>>
>>
>
>Cetin, attention to NULL returns :)
>
>>If you like if series and do not obey 'one return point' rule (I don't):
>>
>>
>>if !dodefault()
>> return .f.
>>endif
>>if !...
>> return .f.
>>endif
>>
Cetin

Fabio,
I would also check type of returns but original post guarantees a logical (not null) return as I get it.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform