Xref: utzoo comp.lang.c:12166 comp.arch:6180 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucsdhub!esosun!seismo!uunet!igor!dsb From: dsb@igor.uucp (David S. Bakin) Newsgroups: comp.lang.c,comp.arch Subject: Re: one large array in Pascal Message-ID: <320@igor.UUCP> Date: 28 Aug 88 03:16:04 GMT References: <5262@june.cs.washington.edu> <260@thor.wright.EDU> <479@m3.mfci.UUCP> <36174@yale-celray.yale.UUCP> <1268@mcgill-vision.UUCP> Sender: news@igor.UUCP Reply-To: dsb@igor.UUCP (David S. Bakin) Organization: Rational, Santa Clara, CA Lines: 27 In article <1268@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes: >In article <36174@yale-celray.yale.UUCP>, lisper-bjorn@CS.YALE.EDU (Bjorn Lisper) writes: >> In article <20349@watmath.waterloo.edu> atbowler@watmath.waterloo.edu (Alan T. Bowler [SDG]) writes: >>> A classic example are those Pascal programs that allocate 1 large >>> static linear array and then run their own memory allocator [...]. >> Just a comment on this....this is the typical technique to implement >> pointers and dynamic memory handling in Fortran, [...]. Are "those >> Pascal programs" maybe translated Fortran programs? > >I know of at least one which isn't: TeX. > >Why did Knuth do it this way? I can only guess; I would guess that >it's for some portability reason I am not aware of. TeX is written in a subset of Pascal that doesn't include 'with' statements, any use of the heap, set types, enumerated scalar types, 'var' parameters, tag fields on variant records, assignments real := integer, or nested procedure declarations. It is nearly character-set independent, and goes to great lengths to use only portable constructs for exact arithmetic. The goal was to make it as easy to port as possible to the various brain-damaged Pascal compilers that existed at the time; in fact it is now automatically translated into C, and possibly other languages as well. -- Dave ---------------------------------------------------------- Dave Bakin (408) 496-3600 c/o Rational; 3320 Scott Blvd.; Santa Clara, CA 95054-3197 Internet: dsb@rational.com Uucp: ...!uunet!igor!dsb