Path: utzoo!attcan!uunet!mcvax!unido!infbs!neitzel From: neitzel@infbs.UUCP (Martin Neitzel) Newsgroups: comp.lang.modula2 Subject: Re^2: Error in PD Modula-2 compiler? Or just in my brain? Summary: Does spreading misinformation world-wide make fun to some people, or what? Message-ID: <1231@infbs.UUCP> Date: 28 May 89 22:16:19 GMT References: <340@actisb.UUCP> <1090@gmdzi.UUCP> Followup-To: comp.lang.modula2 Organization: TU Braunschweig,Informatik,West Germany Lines: 31 kloppen@gmdzi.UUCP (Jelske Kloppenburg) writes: JK> JK> The type transfer in the TU Muenchen Modula2 is as follows: JK> FROM SYSTEM IMPORT VAL; [...] JK> BEGIN ... c:=VAL(CARDINAL,b); .... JK> JK> I learned it from reading some source in the package. From reading Wirth's Modula2 report, [10.2 "Standard procedures"], you might learn even more. 1. VAL is _not_ a "type transfer function" [pim3, 12.], but a standard procedure [pim3, 10.2]. Especially, VAL conversions guarantee to preserve the value, which may involve changes in the representation. Type transfers, on the other hand, do not. 2. Usage of VAL doesn't require SYSTEM. (pim3: "Standard procedures are predefined.") 3. This VAL is constrained to some integral types and won't help in the original "TYPE Stack = List" problem. 4. It is a known ambiguity in the Modula2 report: Can standard identifiers be redefined or not? In procedures, definitely yes, but the situation in modules is not clear at all. Depending on this ambiguity, the TU Muenchen compiler may or may not be considered PIM3-conforming ("broken" is too harsh a word in this context). In any case, the compiler has to provide a standard procedure VAL in addition to the SYSTEM-VAL mentioned by you. Martin Neitzel