Path: utzoo!utgpu!water!watmath!clyde!rutgers!tut.cis.ohio-state.edu!ut-sally!husc6!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.pascal Subject: Re: Pascal Enumerated I/O Message-ID: <681@cresswell.quintus.UUCP> Date: 22 Feb 88 10:37:20 GMT References: <11903@brl-adm.ARPA> <673@cresswell.quintus.UUCP> <1077@csuna.UUCP> Organization: Quintus Computer Systems, Mountain View, CA Lines: 17 In article <1077@csuna.UUCP>, abcscnuk@csuna.UUCP (Naoto Kimura) writes: > In article <673@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: > As someone has already stated, I/O of enumerated types is contradictory to > the policy of strong typing. Output of boolean values was probably allowed > because they are used quite often. And anyway, I wouldn't go classifying > booleans as an enumerated type, as they behave differently. (1) Booleans in Pascal are exactly the same as any other enumerated type, except for having some built-in operators. In fact, Boolean isn't a reserved word, it's just a type declared in the block surrounding the program. (2) I/O of enumerated types is contrary to the policy of strong typing? Sorry, I just can't see that. Forcing the programmer to work in terms of Ord() values, now *that* is contrary to the policy of string typing. I guess the designers of ADA agree with me and the original poster, because ADA provides a built-in package ENUMERATION_IO.