Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single line vs multiple lines assignment
Message
From
09/02/2011 10:22:53
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01499222
Message ID:
01499360
Views:
43
I could see the use of both examples --

I could see using the STORE command to initialize a group of variables that are all of the same type -- this would be faster than having each on its own line and I believe at this point it is easy to read. So this form would be after declaring the variables in a LOCAL or PRIVATE or GLOBAL statement.

Then when variables are being manipulated in code, I would not use the STORE command. I believe each should have its own assignment as an individual line. Having multiple variables all being assigned to the same value at this point also does not make sense to me -- why have different named variables all with the same value? I guess there might be a case for this, but again I would explicity assign each its own value in a separate line -- this allows for additional commenting on the line to indicate why multiple variables all have the same value...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform