The Dink Network

&arg# variables

December 9th 2008, 02:47 AM
dinkdead.gif
DinkC Ref. says that &arg# is 'The first (or 2nd, etc) argument passed to a procedure'. So in this case for example:

//script a
external("script_b", "blah", 54);

//script b, procedure blah
//&arg1 == 54

Will &arg1 be 54 for the rest of that procedure or is it possible that it might change? What I mean is, is it safer to do something like int &temp = &arg1; or is that unnecessary?
December 9th 2008, 10:01 AM
duckdie.gif
I haven't had to deal with &arg stuff since I fixed the slot machine in Initiation... I *think* &arg1 will stay as it is until you use another "external" line. At least, that's how it should work.
December 9th 2008, 07:29 PM
fairy.gif
Someone
Peasant He/Him Australia
 
It will stay the same. I had a look at the source and every script has its own arg1..9 variables.

In DinkC, they are 'pseudovariables'.. eg arg1 can be 1 in one script and 2 in another concurrently (though you may want to test this directly just to be sure)
December 10th 2008, 04:38 PM
dinkdead.gif
Ok I thought it would be like that, thanks