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