Article View: comp.sw.components
Article #136Re: Assignment in Ada
From: William Thomas Wolfe, 2847
Date: Sun, 24 Sep 1989 18:04
Date: Sun, 24 Sep 1989 18:04
47 lines
2318 bytes
2318 bytes
From ted@nmsu.edu (Ted Dunning):
> let's call [Ada assignment procedure] setq instead of assign.
>
> now what is the relation of parameter passing by value (i.e.
> initializing) on the reference counts in a reference counting adt?
The answer is that in general, there IS no "parameter passing by
value"!!!!! From the Ada 83 reference manual, 6.2.7:
...The language does not define which [parameter passing
mechanism] is to be adopted for parameter passing, nor
whether different calls to the same subprogram are to use
the same mechanism. The execution of a program is erroneous
if its effect depends on which mechanism is selected by the
implementation.
This leaves the compilers free to implement parameter passing
any way they want to. The semantics of parameter passing are
simply this:
If the parameter is "in", you can read it but not write it.
If the parameter is "out", you can write it but not read it.
If the parameter is "in out", you can read and write it.
The parameter will be of the specified type, and can be
referenced by the specified name.
If the user does not specify a parameter value, the specified
default value will be supplied.
Thou shalt assume nothing else about the passing of parameters.
> [...] pre-processors don't exist either and extension are outlawed?
Actually, preprocessors do exist; I believe the Classic Ada product
(which provides inheritance and dynamic binding to the Ada O-O types)
works via preprocessing. However, they must be kept separate from
any validated compiler system.
> well why didn't we just use lisp to implement our adt's?
No concept of data typing, perhaps?
Bill Wolfe, wtwolfe@hubcap.clemson.edu
Technical Details
Message-ID:
<6564@hubcap.clemson.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!uakari.primate.wisc.edu!uwm.edu!mailrus!iuvax!cica!gatech!hubcap!billwolf%hazel.cs.clemson.eduReferences:
<TED.89Sep23235728@kythera.nmsu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ginosko!uakari.primate.wisc.edu!uwm.edu!mailrus!iuvax!cica!gatech!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.sw.components Subject: Re: Assignment in Ada Message-ID: <6564@hubcap.clemson.edu> Date: 24 Sep 89 18:04:53 GMT References: <TED.89Sep23235728@kythera.nmsu.edu> Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 47