realbasic-nug
[Top] [All Lists]

method parameter as array

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: method parameter as array
From: Tony Alfrey <tonyalfrey@earthlink.net>
Date: Thu, 29 Jan 2009 11:27:18 -0800
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; domainkeys=hardfail (test mode) header.From=tonyalfrey@earthlink.net
Delivered-to: listarchive@realsoftware.com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=UY2pf5b8TU8ISl7XnPRjWOQG5txHSeDjv+tYyycbLDLAThFyLnBKtxHVNCj+Tob2; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP;
Domainkey-status: bad (test mode)
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)
Hello;

A newbie question.
I need to pass an array A(10,10) of double values to a method.
I have tried
Sub Method_Name(A(10,10) as double, other_parameter as integer, another_parameter as double)

but this fails.
Additionally, it would be very helpful to re-dimension the array from within the method using

ReDim A(X,Y)

I can do all of this by declaring the array globally, but then the method is not quite as "portable" between programs. Incidentally, what I'm doing is translating some subroutines from "Numerical Recipes in Fortran" so it's nice to have the parameters passed just like the C subroutines in the book.

Thanks in advance.

--
Tony Alfrey
tonyalfrey@earthlink.net
"I'd Rather Be Sailing"

_______________________________________________
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>