Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to return what VFP will do to my code?
Message
From
19/12/2018 10:36:55
 
 
To
19/12/2018 07:19:36
General information
Forum:
Visual FoxPro
Category:
CodeMine
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01664494
Message ID:
01664635
Views:
36
I never got to like the ! operator - I actually use NOT most of the time - I think its because I just tend to see the "NOT" in my code better than "!".

After many years I have started to move away from both of those to - I don't know what to call it - a "secondary" comparison?...comparing to the logical value wanted:

SET FILTER TO Inactive = .T.
SET FILTER TO Inactive = .F.

I plan to retire in a few years and I figure the above is more readable for someone new than:

SET FILTER TO Inactive
SET FILTER TO NOT Inactive

In the 2nd case, the (new) developer has to know or surmise that Inactive holds a logical value. And if they were an experienced VFP developer they would.

Any idea what the syntax is like for other languages?

Albert


>>
>>SET FILTER TO Inactive = .F.
>
>I prefer Set Filter to !inactive
Previous
Reply
Map
View

Click here to load this message in the networking platform