local and global

how do I declare a string locally and globally?

Do you mean how do you declare a variable locally or globally? If so, a variable is local unless it’s declared as global. e.g.

global theVariable

although making it a property seems to work better for me. e.g.

property theVariable : initialValue


global theVariable is almost deprecated - you really are best off to use ‘property theVariable : initial value’

If I don’t know the value immediately, I use ‘property theVariable : missing value’, and theValue gets set later (and the variable does not occupy any memory until it is set - missing value is a key phrase)

  1. What does almost mean here. is it or is it not deprecated?
  2. Why is property better than global? I use global when I don’t want the values to reappear when I run the application a second time.


May I join the fray?

I actually use both global and property but I do lean more to the latter.

One huge advantage of property is in enabling values to persist so that users do not have to keep setting values all the time across uses once the default values have been identified and saved.

archseed :slight_smile: