Computer Science Canada

passing array by reference

Author:  be natural* [ Sun Jun 08, 2003 10:49 am ]
Post subject:  passing array by reference

hi there,

how can i pass array by reference?


procedure pDataChart (var rData: real)

var rData : array 1 .. 16, 1 .. 7 of real

rData (1, 1) := 0
etc.

end pDataChart

when I tried to run this, the error viewer says "rData has previously declared." so what should i do with that?

thx

Author:  Tony [ Sun Jun 08, 2003 11:45 am ]
Post subject: 

something like
code:

procedure something(var yourArray:1..* of real, arraySize : int)

for i:1..arraySize
put yourArray(i)
end for

end something

/\ I think thats how it works


: