Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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 | chip programmers | 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