Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!cca!ima!inmet!muller From: muller@inmet.UUCP Newsgroups: net.micro Subject: Arrays in Apple PASCAL Units? - (nf) Message-ID: <1138@inmet.UUCP> Date: Fri, 23-Mar-84 00:00:24 EST Article-I.D.: inmet.1138 Posted: Fri Mar 23 00:00:24 1984 Date-Received: Sun, 25-Mar-84 08:24:33 EST Lines: 21 #N:inmet:5800047:000:1291 inmet!muller Mar 22 01:14:00 1984 Question: In Apple PASCAL 1.1, how can one write a procedure to be included in a Units library file that will take variable-dimensioned arrays passed to it as referenced parameters? If you give the procedure statement in the Interface part of the Unit and specify an array type (to insure that the types will agree between the procedure and any calling program) the compiler doesn't like it. Apparantly you must either use a standard type or declare the type in the Interface section, which produces another compiler error if the type statement comes before the var statement. This precludes any non- constant subscript definitions for a utility procedure, as near as I can see. A related question is: Can you declare variables local to a procedure in a Unit in the procedure block, or must the all go in the interface section? If you cannot, then all procedures and functions in any Unit must see the same variable identifiers. Finally, what does Apple PASCAL need for two arrays to be of the same type? Just similar element types and subscript ranges, or is the requirement more strict? These two questions relate to how one might write "generalized" procedures in a Unit the can take arrays as parameters. Thanx, Jim Muller ima!inmet!muller or harpo!inmet!muller