Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!BBN-PROPHET.ARPA!cosell From: cosell@BBN-PROPHET.ARPA (Bernie Cosell) Newsgroups: net.micro.amiga Subject: BASIC help needed: passing arrays to SUBs Message-ID: <8607240110.AA05004@ucbvax.Berkeley.EDU> Date: Wed, 23-Jul-86 21:04:01 EDT Article-I.D.: ucbvax.8607240110.AA05004 Posted: Wed Jul 23 21:04:01 1986 Date-Received: Thu, 24-Jul-86 05:06:07 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 27 Hi- Perhaps someone can help me with a simple (I assume) problem I'm having with AmigaBasic and can't get around no matter what I try. The problem is simple: I'm trying to given a array argument to a SUBprogram. The manual sure makes it look like it is supposed to work, but everything I try earns me a "type mismatch" on the CALL statement. For example: SUB pcell (a(1), i) STATIC print a(i) END SUB DIM x(10) x(1) = 1.5 PRINT x(1) CALL pcell(x, 1) The PRINT works find, but I get the aforementioned "type mismatch" error on the CALL statement. What am I doing wrong?? Much thanks /Bernie Bernie Cosell Internet: cosell@prophet.bbn.com Bolt, Beranek & Newman, Inc USENET: bbncc5!bpc Cambridge, MA 02238 Telco: (617) 497-3503