Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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
Happy Birthday 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