Xref: utzoo comp.lang.misc:2675 comp.lang.modula2:1269 Path: utzoo!attcan!uunet!ingr!garth!phipps From: phipps@garth.UUCP (Clay Phipps) Newsgroups: comp.lang.misc,comp.lang.modula2 Subject: Re: Modula-2 Cast Syntax (was Re: What is B&D? (...)) Keywords: cast,conversion Message-ID: <2526@garth.UUCP> Date: 8 Feb 89 01:49:58 GMT References: <186@m2xenix.UUCP> <2493@garth.UUCP> <196@m2xenix.UUCP> Reply-To: phipps@garth.UUCP (Clay Phipps) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 42 In article <196@m2xenix.UUCP> randy@m2xenix.UUCP (Randy Bush) writes: >In article <2493@garth.UUCP> phipps@garth.UUCP (Clay Phipps) writes: >>... Is the ISO proposal trying to make way for a distinction between >>casts and conversions [in Modula-2] ? >Well, casts and conversions were always clearly distinct in the language,... > TypeName ( object ) (* cast *) > VAL ( TypeName, value ) (* conversion *) I confess that I had forgotten about "VAL" in the long time since I've looked at Modula-2. According to the "Report On The Programming Language Modula-2" (in Wirth: _Programming In Modula-2_, 1st ed., 1982), the "VAL" standard procedure is applicable only to values of ordinal types, excluding reals and strings, and, thereby, falling short of what I expected. Perhaps the applicability of "VAL" was broadened in the 2nd edition, which appeared a month or so after I bought my copy of the 1st edition. The apparent absence of standard procedures to convert between string and scalar types (and vice versa) without performing I/O is particularly surprising in a language deriving its name from "modules". Have string conversion standard procedures been added ? >So, a compromise was reached (don't you just _love_ committees:-). >... aside from resenting the inordinate amount of time spent on a >trivial issue, the current proposal seems reasonable to me. And you? Just to be on the safe side -- nein ! nyet ! :-}. What the heck, you're stuck with the earlier decisions. >Anyone saying 'no' is hereby sentenced to a full day of discussing this in >an uncomfortable room in a strange town with twenty other language lawyers. I've already know what that is like, although not for that committee, and only if San Jose qualifies as a "strange town". I'd prefer that to the >=2 days that I've wasted trying to install a hard disk on my PC, sans even the most rudimentary documentation on controller and drive. Wanna trade hassles ? Now bring on those import/export rules ... 8-| -- [The foregoing may or may not represent the position, if any, of my employer] Clay Phipps {ingr,pyramid,sri-unix!hplabs}!garth!phipps Intergraph APD, 2400#4 Geng Road, Palo Alto, CA 93403 415/494-8800