Newsgroups: comp.lang.c Path: utzoo!utgpu!jarvis.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: Re: Should I convert FORTRAN code to C? Message-ID: <8807121629.AA07169@explorer.dgp.toronto.edu> Organization: University of Toronto References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <10023@ames.arc.nasa.gov> <10032@ames.arc.nasa.gov> <6551@sigi.Colorado.EDU> <377@uwovax.uwo.ca> Date: Tue, 12 Jul 88 11:09:25 EDT 16012_3045@uwovax.uwo.ca (Paul Gomme) writes: >>Am I totally missing something, or is this not a multidimensional array: >>int array[10][15]; >>?? swarbric@tramp.Colorado.EDU (Frank Swarbrick) writes: >Try that sort of thing under MS-DOS, with a _BIG_ matrix -- try >something like: > int array[200][200]; >I've tried this sort of thing with Turbo C, and know someone who checked out >MSC for me. The compiler choked on it because the array exceeds 64K. However, >I've used a Fortran compiler which will let me create such matrices with >absolutely no complaint. GEE, this is not part of the C language. The purpose of a compiler is to hide, or possibly, in the case of MS-DOS, apologize for, the architecture. If you declare an object of greater size than 64K, pointers to it should use a different segment register value for accesses to elements 32768 and beyond. This isn't harder to do in C than in Fortran. In Fortran under MS-DOS you would also have to have every function decide for each of its input parameters whether it is a pointer-to-64K-or-less or a pointer-to-more-than-64K. Don't judge the C programming language by a few C compilers (and I use the term `C' loosely). MS-DOS C compilers seem only to accept a subset of the C language because it allows them to compile certain benchmarks into faster code. ajr -- owotd (rot13): fabgentf