🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #1484

Re: Array parameter passing

#1484
From: Ian W Moor
Date: Tue, 06 Oct 1992 11:59
27 lines
1611 bytes
In article <1992Oct5.230036.8066@dfv.rwth-aachen.de>, maho@dfv.rwth-aachen.de (Martin Horneffer) writes:
|> minyard@crchh453.bnr.ca (Corey Minyard) writes:
|> Here come how the Oberon(-2)-compiler I use (Amiga-Oberon) solves the
|> problem:
|> One is to avoid the copying of ARRAY-parameters. If this is used in
|> a certain procedure, this procedure, of course, may not change this parameter.
|> 
|> Example:
|> 
|>     PROCEDURE PrintString(s : ARRAY OF CHAR); (* $CopyArrays- *)
|>     
|> Another solution would be to make to Compiler intelligent enough to see that
|> the ARRAY ist not changed in the procedure and then chose this option 
|> automatically.
|> 

Getting the compiler to do it right is much the best way ! What happens if
you disable array copying and then later by mistake you modify the procedure 
to change the string ?

 
-- 
Ian W. Moor		+71 589 5111 x 5039
iwm@doc.ic.ac.uk   Department of Computing, Imperial College.            
"Experts from BNFL have advised the Russians to rename Chernobyl as Sellograd
 and open a tourist centre"
Technical Details
Message-ID: <1arv24INN3nl@swan.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!iwm
References: <1992Oct01.203420.3612@bnr.ca> <1992Oct5.230036.8066@dfv.rwth-aachen.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!iwm
From: iwm@doc.ic.ac.uk (Ian W Moor)
Newsgroups: comp.lang.modula2
Subject: Re: Array parameter passing
Date: 6 Oct 1992 12:59:00 +0100
Organization: Department of Computing, Imperial College, University of London, UK.
Lines: 27
Distribution: world
Message-ID: <1arv24INN3nl@swan.doc.ic.ac.uk>
References: <1992Oct01.203420.3612@bnr.ca> <1992Oct5.230036.8066@dfv.rwth-aachen.de>
NNTP-Posting-Host: swan.doc.ic.ac.uk
Keywords: Oberon, parameter passing