Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 passing array by reference
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
be natural*




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Jun 08, 2003 11:45 am   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: