Gamestudio Links
Zorro Links
Newest Posts
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (AndrewAMD), 23,817 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joe_kane, Namitha_NN, Syndrela, agasior, mosfet
19189 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
var names #260997
04/15/09 07:58
04/15/09 07:58
Joined: Dec 2008
Posts: 124
bobby_danseco Offline OP
Member
bobby_danseco  Offline OP
Member

Joined: Dec 2008
Posts: 124
hi,

i have a function with the the var parameter in it.
is it possible to change the var name everytime i called that function or re-declare that var name.

Code:
  
 function myfunc(STRING* mystr, var _myvar)
 {
    _myvar = file_open_read(mystr);
    ....
    ....
 }

 .......
 .......
  myfunc("somestr",10);
  myfunc("otherst",11);
  so on ....... 



is it possible to change _myvar to _hisvar when i call myfunc.


thanks..

Re: var names [Re: bobby_danseco] #261100
04/15/09 20:29
04/15/09 20:29
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
well i don't really get the sense of what you're trying to do...

Re: var names [Re: Scorpion] #261133
04/15/09 23:02
04/15/09 23:02
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

If I'm not mistaken, your var in the function is just a
name that can receive any value from any other var.

so when _hisvar is sent to that function it works using _myvar in your function, but the value is from and is _hisvar.

Ottawa smile


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1