testing whether the value of a variable is an array
Ian Summerfield
iansummerfield at btconnect.com
Fri Apr 19 03:27:01 EDT 2002
On 11/4/02 5:58 pm, "Jeanne A. E. DeVoto" <jeanne at runrev.com> scribed:
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? Is there
anything else hidden away like using ^ or ^^ to reference pointers and
handles?
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?
>> Is there a clean way to test this? Currently I'm using a pragmatic test:
>>
>> function isArray @v
>> if v <> empty then return false
>> return (the keys of v <> empty)
>> end isArray
>>
>> Is this reasonable? Is there a more 'official' way?
>
More information about the use-livecode
mailing list