Article View: comp.lang.modula2
Article #3241Re: Modula2 for C programmers?
From: Michel De Rosa
Date: Fri, 02 Feb 1996 23:22
Date: Fri, 02 Feb 1996 23:22
51 lines
2658 bytes
2658 bytes
Peter P. Eiserloh (Peter_Eyes_Eiserloh@WSSAGW.chinalake.navy.mil) wrote:
: Hi,
Hello,
: [...]
:
: In article <DM2KB6.983@nyongwa.montreal.qc.ca> Michel De Rosa,
: aliath@nyongwa.montreal.qc.ca writes:
: >Mark Morgan Lloyd (mark_tbu@cix.compulink.co.uk) wrote:
: >: > neither does it do any sort of interpretation of the bits,
: >: > i.e. it's a straight copy of the bitmap, if you will..
: >:
: >: Watch it! I've argued this one in the past with TopSpeed, who IIRC under
: >: certain circumstances _do_ apply transformations.
: >
: >Really? They do that?... hmmmm do you have any cases, where they do this,
: >so i can avoid 'debugging' time.. ;{)
: >
: >I really don't see what aspect of this 'feature', they felt needed changing,
: >PIM is really quite clear on this... I would have argued the point too..
:
: Type transfer functions (CASTs) do not simply copy the bits, but rather
: they have some very simple sematics.
:
: [... followed but a clearly laid out explanation of CASTing ...]
I'd like to point out, that we where talking about JPI's implementation of a
more or less PIM3 M2.. In PIM the type transfer functions, are actually type
'coercion' functions (with some exceptions, like VAL/TRUNC etc..)..
"[...] Foremost is the facility to breach Modula's type system:
type identifiers can be used as function identifiers denoting
a <type transfer function>. Such a function is considered as
transferring a value of the type given by the parameter into
the corresponding value of the type specified by the function
identifier. [...] The key idea behind these type transfers is,
however, that they do not involve any actual computation. Hence
in the above examples, INTEGER(C) is used, if the bit pattern
representing the cardinal value C is to be interpreted as an
integer, [...]. The functions have the purpose of indicating
the intended interpretation and of disabling the compiler's
type checking and error reporting system."
Excerpt from Programming in Modula-2, chap. 29, 4th edition.
by Prof. Niklaus Wirth, Springer-Verlag.
: Peter
: -----
Michel.
Technical Details
Message-ID:
<DM68y0.1Dt@nyongwa.montreal.qc.ca>Path:
arc1-ca.pugleaf.net!mcrcim.mcgill.edu!nyongwa!aliathReferences:
<DLMz95.9r4@cix.compulink.co.uk> <DM2KB6.983@nyongwa.montreal.qc.ca> <DM49Ht.Iwp@avalon.chinalake.navy.mil>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2 Path: arc1-ca.pugleaf.net!mcrcim.mcgill.edu!nyongwa!aliath From: aliath@nyongwa.montreal.qc.ca (Michel De Rosa) Subject: Re: Modula2 for C programmers? Message-ID: <DM68y0.1Dt@nyongwa.montreal.qc.ca> Organization: Radio Free Nyongwa, Montreal (Qc), Canada Date: Fri, 2 Feb 1996 23:22:48 GMT References: <DLMz95.9r4@cix.compulink.co.uk> <DM2KB6.983@nyongwa.montreal.qc.ca> <DM49Ht.Iwp@avalon.chinalake.navy.mil> X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]