Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/20/26 15:57
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Quad, madgamer, TipmyPip), 3,484 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
juergenwue, VladMak, Geir, ondrej, mredit
19208 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