Hi Sergey,
Thanks for your update. Your list of array functions is much appreciated as is your catch of 'wait ... to VAR'
I'm not sure I understand your suggestions for 'CHRTRAN, STRTRAN, and STUFF'.
My interpretation of the Help files indicates that these functions operate on existing variables only, i.e. there's no way to use these functions by themselves to create new variables. My interpretation of the Help files also leads me to believe that these functions do not physically change any passed variables - they only return the end result of their string processing.
Do you have a different interpretation?
Thanks for your help!
Malcolm
>>I'm working on a simple 'lint' like utility to analyze VFP code. As part of the analysis process, I would like to track where variables are being created or (potentially) updated. With respect to functions, the only native functions that I'm aware of where VFP changes values by reference are functions that apply to arrays, i.e. adir(), alines(), aprinters(), etc.
>>
>>Are there other native VFP functions that update function parameters by reference?
>>
>>Here is my short list of VFP commands/syntax that create, release or potentially update variables. Note that in the following list, VAR is used to describe simple, scalar variables, arrays, or objects. I recognize that my grouping of commands into contemporary and deprecated (commands that we should no longer use) is highly subjective.
>>
>>Contemporary commands:
>>- Assignment statements: VAR = expression
>>- Average|Calculate|Count|Sum expression [, expression ... ] to VAR [, VAR ... ]
>>- Copy to array VAR ...
>>- Do myfun with VAR [, VAR ... ] // forces variables to be passed by reference
>>- Explict passing of variables by reference: myfun( @VAR [, @VAR ... ] )
>>- For [ VAR = ... | each VAR in ]
>>- Public|Local|Dimension VAR [,VAR...]
>>- Scatter [ memvar | to VAR| name VAR ]
>>- Select ... into array VAR
>>- Set textmerge to VAR memvar // new in VFP7!
>>- Store expression to VAR [, VAR ...]
= ACOPY(.., array Var)
ADATABASE, ADBOBJECTS, ADEL, ADIR, ADLLS, AERROR, AFIELDS, AFONT, AGETCLASS, AGETFILEVERSION, AINS, AINSTANCE, ALANGUAGE, ALINES, AMEMBERS, AMOUSEOBJ, ANETRESOURCES,APRINTERS, APROCINFO, ASELOBJ, ASESSIONS, ASORT, ASTACKINFO, ATAGINFO, AUSED, AVCXCLASSES
CHRTRAN, STRTRAN , STUFF
& - macro substitution
>>Deprecated commands:
>>- @ ... get VAR
>>- Accept ... to VAR
>>- Clear memory
>>- Declare VAR [, VAR ] // Dimension is the 'prefered' syntax
>>- Private VAR, VAR // does not create vars, but hides visibility
>>- Release [ like pattern | except pattern ]
>>- Restore from ... [additive]
>>- Set Udfparms to reference // Udfparms 'should' be set to value
WAIT ... TO Var