Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLSERVER Rollback
Message
From
04/01/2019 02:28:35
 
 
To
03/01/2019 18:12:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01665065
Message ID:
01665105
Views:
60
I used mostly IF NOT, but lately working more and more with Java and C# developers I tend to switch over to
IF ! MyFlag
Also in the same thought, instead of
IF m.lnRetVal = 0
I use now more often:
IF (m.lnRetVal == 0)
The single = was very confusing to them and they thought, how can an assignment return a boolean value? So I use single = only for the exceptions where it really is meant to be.

>Hi Tamar,
>
>And here I was starting to change all my code that used your preferred syntax (option 1 below) with the 2nd - thinking that the 2nd would be more readable to someone else taking over my code! Is there any consensus out there as to what is the "best" way to code this? Or if not a consensus, what do most VFP do?
>
>I have always done method number 1 below until just a few months ago when I thought I should change...
>
>Albert
>
>
>>I also want to point out that your code would be more readable if you use NOT rather than comparison with logical values. That is, at least in my view, it's easier to read and understand:
>>
>>
>>IF NOT MyFlag
>>
>>
>>than
>>
>>
>>IF MyFlag = .F.
>>
>>
>>Tamar
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform