Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
M.var=bof() or eof() or m.var WHAT???
Message
From
16/07/2001 08:33:48
 
 
To
16/07/2001 00:10:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00530035
Message ID:
00530931
Views:
16
That opens up another coding habit that I see from time to time:
IF MyVar = .T.
>I know you were just explaining Craig :-)
>I think the parentheses do help. Sometimes when it gets complex I'll go over a few lines like..
>
>THIS.TOPFILE = ;
>   ( THIS.TOPFILE ;
>     OR EOF() ;
>     OR BOF() ;
>   ) ;
>   AND (SomeotherCondition())
>
>
>As far as readability goes I expect my guys to be able to cope with a little boolean logic. Whenever I see that "if x=y then z=true else z= false" type of coding then I suspect the programmer doesn't really have a grasp of things.
>
>>I agree with you. I was just responding with what the one line of code does. I usually use the one line method. However, I would write it like:
>>
>>
>>THIS.TOPFILE = (THIS.TOPFILE OR EOF() OR BOF())
>>
>>
>>Note the additional parens. IMO, is makes it a bit easier to read, especially if the one line is something like:
>>
>>
>>llFlag = (MyVar = SomeFunction())
>>
>>
>>Leaving off the parens is more confusing in this case
>>
>>>Hi Craig,
>>>snip...
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform