Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!endor!chavez From: chavez@endor.UUCP Newsgroups: comp.sys.mac.hypercard Subject: Hypercard XCMD Gotchas Message-ID: <3185@husc6.UUCP> Date: Fri, 13-Nov-87 00:12:40 EST Article-I.D.: husc6.3185 Posted: Fri Nov 13 00:12:40 1987 Date-Received: Sat, 14-Nov-87 18:26:03 EST Sender: news@husc6.UUCP Reply-To: chavez@endor.UUCP (R. Martin Chavez) Distribution: na Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 29 I've just spent the past three hours nailing this bug. Here's the story. Take any of the APDA XCMDs (e.g., flash) and add the following definitions inside the main routine called by Entrypoint: CONST kMaxFields = 1; kMaxType = 1; TYPE FieldRec = RECORD fieldNames: ARRAY [1..kMaxFields] OF STRING; suffices: ARRAY [1..kMaxFields] OF STRING; END; VAR fieldInfo: ARRAY [1..kMaxType] OF FieldRec; Now follow the usual procedure for compiling, linking, and pasting with ResEdit. Invoke the XCMD from Hypercard, and watch Hypercard die a miserable death with error 28. It seems that you can't have local arrays with records in them; there's probably some funny business going on at initialization time. Be careful! R. Martin Chavez Dept. of Computer Science Stanford University