Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!decwrl!comet.dec.com!fulton From: fulton@comet.dec.com (Cathy Fulton -- CXO Technical Training) Newsgroups: comp.lang.pascal Subject: Re: TP problem Message-ID: <8711060510.AA12477@decwrl.dec.com> Date: Fri, 6-Nov-87 01:09:00 EST Article-I.D.: decwrl.8711060510.AA12477 Posted: Fri Nov 6 01:09:00 1987 Date-Received: Sun, 8-Nov-87 11:38:09 EST Organization: Digital Equipment Corporation Lines: 33 jjoshua writes : > Here's the deal.. > >type dirct = (n,s,e,w,ne,se,sw,nw) ; >var v : dirct ; > >v is a variable with an ennumerated type, right? > >readln(v) ; > >gives an I/O not allowed error. I am using turbo pascal. >Am I doing something wrong or do I need a REAL compiler? > >Any help SOON would be greatly appreciated. From "Introduction to PASCAL and Structured Design" by Dale/Orshalick : "Since user-defined types have meaning only within the program, we cannot read them in or write them out." (Note that for Dale/Orshalick, "user- defined" is an alias for "enumerated.") It is the exception for a Pascal compiler to provide I/O for enumerated types. It is not part of the language definition. One semester I did a project in Pascal on a SUN running Unix, and I was really suprised when I was able to directly write out enumerated types - I thought it was pretty neat. But, the compiler did warn me that that was a "non-standard feature;" this is further evidence that such a capability is exceptional. - Cathy uucp: ...decwrl!comet.dec.com!fulton ARPA: fulton@comet.dec.com