Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ucsd!orion.cf.uci.edu!uci-ics!venera.isi.edu!aero!sm.unisys.com!csun!csuna!abcscnuk From: abcscnuk@csuna.csun.edu (Naoto Kimura) Newsgroups: comp.lang.pascal Subject: Re: An ISO Pascal question... Message-ID: <1753@csuna.csun.edu> Date: 12 Mar 89 04:16:48 GMT References: <18654@adm.BRL.MIL> <2824@kalliope.rice.edu> <1752@csuna.csun.edu> Reply-To: abcscnuk@csuna.csun.edu (Naoto Kimura) Organization: CSU Northridge Lines: 68 Ooops, forgot to answer the question... No the declarations as in the original posting are not legal. There isn't a problem in having a field 'T' in the record, but you can't use 'T' as a type, because within the scope of the record type, 'T' is a field of type integer, not the same 'T' which is a type that is real. The following program may help to clarify some things... :-) ---- cut here -------- cut here -------- cut here ---- program strange (output); const writeln = 1; readln = 50; type real = writeln..readln; write = (eof, eoln); read = char; boolean = packed array [ real ] of read; var get : read; true, false : write; dispose : boolean; procedure maxint ( var eoln : text; get : boolean; eof, read : real ); forward; procedure integer ( var eof : text; get : boolean; read, write : real ); begin if read < write then begin maxint ( eof, get, write, read+1 ); eof^ := get[read]; put (eof); end; end; procedure maxint; begin if read < eof then begin integer ( eoln, get, read, eof-1 ); eoln^ := get[eof]; put (eoln); end; end; begin true := eof; false := eof; dispose := ' .ri rvgitmsso agr iT hspormde oehn eywed '; if true = false then begin integer ( output, dispose, writeln, readln ); end; end. ---- cut here -------- cut here -------- cut here ---- BTW. The above program should compile on compilers that follow the ISO standard. //-n-\\ Naoto Kimura _____---=======---_____ (abcscnuk@csuna.csun.edu) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !!