[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
static or global variables in TS2000i
- To: <omega-list@xxxxxxxxxx>
- Subject: static or global variables in TS2000i
- From: "amjad moghul" <amjadm@xxxxxxxxxxxxx>
- Date: Fri, 29 Dec 2000 07:31:42 -0800
- In-reply-to: <200012290952.BAA03440@xxxxxxxxxxxxxx>
Hi,
Im trying to write an indicator which will pass the value of an arraycount
variable to a function
the function uses the arraycount variable as the index to an array where it
stores some data
I return back to the indicator - but my arraycount variable gets reset to 0
- is there any way
I can retain the last value of the arraycount (i.e static as in C) or - have
a global variable that will
only be initialized once?
Thanks
Sample of code looks like this
RadarscreenIndicator
************************
chk = CheckAlertOccured(GetSymbolname,CurrentBar,HasTriggered,
acnt)
Then Fnction CheckAlertOccured
**************************************
Inputs: Symname(Stringsimple), curBar(Numericsimple),
HasTriggered(numericsimple), Acnt(numericsimple);
Array: mAlertrecord[100,5](""); { 101 Rows 0-100, 6 Cols 0-5 }
Vars: Aloop(0);
For Aloop = 0 to 100
begin
If (UpperStr(mAlertRecord[ACnt,0]) = symname)
......
....
....
Problem is when function returns back into indicator - the 'acnt' (array
counter) is 0 again
Thanks

PureLinks - Finance Banners.