Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!oliveb!pyramid!batcomputer!garry From: garry@batcomputer.tn.cornell.edu (Garry Wiegand) Newsgroups: comp.lang.fortran,comp.lang.pascal Subject: Re: Array storage order Message-ID: <1615@batcomputer.tn.cornell.edu> Date: Sat, 4-Jul-87 23:55:53 EDT Article-I.D.: batcompu.1615 Posted: Sat Jul 4 23:55:53 1987 Date-Received: Sun, 5-Jul-87 18:42:45 EDT Reply-To: garry@oak.cadif.cornell.edu Organization: Cornell Engineering && Flying Moose Graphics Lines: 27 Xref: mnetor comp.lang.fortran:142 comp.lang.pascal:184 Apologies for not getting back sooner; I've been off the net. The consensus of replies to my array-storage question were: Fortran: Storage order is visible in the language (the Equivalence statement), and the standard mandates column-major storage. Pascal: It's not visible in the (standard) language, and the standard does not mandate anything. It is "generally" implemented as row-major. C: It is visible in the language, and the standard mandates row-major storage. Ada: It is visible in the language, but the standard neglects to mandate anything. Which means that Ada beats Fortran for being strange, and that I am living on borrowed time if I assume anything about Pascal. BTW, if you have trouble remembering what "row-major" and "column-major" mean, "row-major" means that a 2-D array will be stored in memory row by row by row (the first index is the row number), and "column-major" means that it's stored column by column by column. My thanks to the several people who replied. garry wiegand (garry@oak.cadif.cornell.edu - ARPA) (garry@crnlthry - BITNET)