General information
Category:
Coding, syntax & commands
>Is there any way of checking the scope of a variable? What is the scope of the memory variables created by SCATTER MEMVAR?
>
>Thanks.
A variable has the scope you assign it.
for example
LOCAL Test
SCATTER FIELDS Test MEMVAR
The variable m.test is scoped to the procedure and does not affect values outside the procedure.
Be careful....
'm.Test' will be a local memory variable.
'Test' will be the current value of the Test field in the table.
'Test' will be visible to all levels of code.
Should you change the location of the record pointer the variable 'Test' will have a different value.
'Test' will have different values in different forms if each form has its own datasession. But, that is another story.
I recommend preceeding all memory variables with 'm.' for clarity.
HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only