realbasic-nug
[Top] [All Lists]

Re: method parameter as array

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: method parameter as array
From: Thomas Tempelmann <tempelmann@gmail.com>
Date: Thu, 29 Jan 2009 21:12:19 +0100
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com; dkim=neutral (body hash did not verify) header.i=@gmail.com
Delivered-to: listarchive@realsoftware.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=pkyb1HEkn+YGPPDkiUqrkPP0pML5NuY3kAWRm1yCTGQ=; b=gMS5vGdFffXppV2EtJfENyKSULw+8R2NZChA28PBKOrmQW+qkTxC2/Xlyh00+9+wZt x9LwBB3EprEdvfBEgGpwSAyXIbAqGMgipDBC2KnuJMg3XOWV+nBMzohnWevqIYwRxPRw STXGtGVA4j52ifwgn/m81L8zYZfrW8WI8/Q1k=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=EnafyVMcC0ZHOAY7xXsUtkfSkjYOf2HeLKKZYeWpy4aaXhEiXyRmUz6OgWd2COkLMY cjKSMcG+OY8RsnIiS6C/lKUxa2npvDQw5MgoPFv6tBYZfmspAsvsYF8x/44Va/E88/GP o7PFifmIVaLzEaqRLRcWUMTOa2SmspXmL9sjY=
In-reply-to: <4982092F.7060407@earthlink.net>
References: <49820316.6090503@earthlink.net> <89fe53800901291133i3e8f2278t2c91ca5e30a0e077@mail.gmail.com> <49820677.5050605@earthlink.net> <4982092F.7060407@earthlink.net>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
> Where does the array get dimensioned, in other words, at what point does
> memory get allocated?  I suppose maybe it is allocated when the array is
> dimensioned in the code that calls the method?
> And if this is the case, it sounds like that the array must be
> re-dimensioned prior to calling the method?

It gets allocated when you declare the _variable_, i.e. in:

dim a(10,10) as double

Then, when you pass this to your subroutine, only a _reference_ to
this variable is passed, just as if the array were an object. This
allows the subroutine to even modify the array (or resize it using the
"redim" statement).

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>