Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
If you code like this.... you might be a crappy coder
Message
From
26/05/2021 18:57:43
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
26/05/2021 18:49:55
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680754
Message ID:
01680756
Views:
72
SCAN FOR ordnmb=m.ordlin.ordnmb AND lnline=m.ordlin.lnline
Definitely agree that SCAN FOR is preferable to SET FILTER, SCAN - though sometimes if code is in 3rd-party resources whose next update will overwrite any local edits, or from decades ago before all current features got added to VFP- then it may be rational to declare "if it ain't broke, don't fix it."

FWIW, in 2021 and if you ever intend to use VFP C++ Compiler: there's a difference between
nStyle_Stone_Price=0
nOrdLin_Var_Price = 0
nDiamValu = 0
nClrValu = 0
nProtected = 0
- and -
store 0 to nStyle_Stone_Price, nOrdLin_Var_Price, nDiamValu, nClrValu, nProtected
By default, the first version will have the variable names obfuscated; the second will not.

You could cause the second version to obfuscate by including comment attributions:
* nStyle_Stone_Price=
* nOrdLin_Var_Price =
* nDiamValu = 
* nClrValu = 
* nProtected = 
Just something to think about! ;-) - J
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform