Hi All,
So we are used to the prefixes of t(temp), p(parameter), g(global), s(script-wide) and k(konstant) in Variables (or constants in the case of k). In Livecode builder scripts though I have notices the 'm' prefix. Just wondering what that symbolised.
Thanks
Pi
Variable prefix in examples
Re: Variable prefix in examples
@seaniepie: We use 'm' in widget scripts to indicate a 'member' variable. It signifies that there is one copy of the variable per instance of the widget. We use 's' in library scripts as there is only one copy - as libraries are global. The reason for the distinction is that we will be changing things slightly so widgets will be definitions in a library, and thus a widget will have access to both its 'member' variables and variables of the library it is defined in.
Re: Variable prefix in examples
Just a note: you can call your variables anything you like, but we recommend using the prefixes you mention because it helps understand what sort of variables the code is using.seaniepie wrote:So we are used to the prefixes of t(temp), p(parameter), g(global), s(script-wide) and k(konstant) in Variables (or constants in the case of k). In Livecode builder scripts though I have notices the 'm' prefix. Just wondering what that symbolised.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com