Re: Pass by Reference
- Posted by newphil82 Jan 22, 2015
- 1828 views
I'm a comparative beginner. So, apologies; perhaps this is unhelpful and too elementary?? (If so, PLEASE delete it!) But recently I wanted a "beginner's" way of passing-by-reference, without doing anything dire.
Suppose I put some significant data into a sequence called, for example, 'datbank', and defined some constants, say THISWEEK = 1, NEXTWEEK = 2, ... whatever makes sense. I could pass by value as usual using, say, datbank[THISWEEK][details] as one of the params.
To pass by reference I'd just pass THISWEEK or NEXTWEEK as integers - and update datbank inside the procedure if required. A single procedure could then do similar updates for either week? - PF