Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anybody been able to do this?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00381450
Message ID:
00381498
Views:
13
Yeah, the IIF() is one of the overused functions in these cases [just like my old snippet]. All this really hit home with me when I started developing databases in Oracle which has no logical equivalent. I have to use Numeric/1 field. So I use a lot of llTrueValue = (This.Value = 1) for check boxes and 2-option groups.



>Great! The only reason I mentioned it is that I personally think that most folks in general don't know how they can save themselves code and aggravation by modifying the way they handle logical values. For example, how many times have we seen some of the following:
IF lcondition = .T.
>  * Just IF lcondition suffices
>  * This adds size because of the literal use of .T.
>ENDIF
>* Or
>DO WHILE .T.
>  * Same as above, plus
>  IF lSomeConditionalExpression
>    * Addtional pcode for the second evalution
>    * and the EXIT statement
>    EXIT
>  ENDIF
>ENDDO
>* Rather than
>ldone = .F.
>DO WHILE NOT ldone
>  ldone = lSomeConditionalExpression
>ENDDO
But that's just me.:-)
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform