testing whether the value of a variable is an array

Jeanne A. E. DeVoto jeanne at runrev.com
Sun May 5 02:50:09 EDT 2002


At 2:56 PM -0700 4/18/2002, Ian Summerfield wrote:
>This "@v" business is new to me.   I'm presuming the @ is similar to using
>VAR in PASCAL for parameters:
>
>  function test(var v:integer);
>
>Compared to
>
>  function test(v:integer);
>
>A pointer to the variable is passed rather than the content?

Right: it's a pass by reference.

>Is there anything else hidden away like using ^ or ^^ to reference
>pointers and handles?

Nope (although you can use "do" to dereference, if you need to. For
example, if the variable "foo" holds "bar", you can reference the contents
of the variable "bar" with the structure
  do "get" && foo

>Which give better performace, using @ for parameters or no @?  Is there a
>point whereby you'd use @,  e.g. Variable is larger than 500 bytes?

I'm honestly not sure. The only times I've used it have been when I need to
return more than one value from a handler.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list