hohooh's blog

How to clear the Array memory??

There are some bugs in my code.
So that I made some test code as follow.
for (int i=Bars;i>=0;i--)
{
   ExtMapBuffer1[i]=i+100;
   Print("i=",i," E0=",ExtMapBuffer1[0]," E1=",ExtMapBuffer1[1],"E2=",ExtMapBuffer1[2]," E3=",ExtMapBuffer1[3]);


=> it returns
iTest_01 EURUSD,Weekly: i=0 E0=100 E1=101 E2=102 E3=103
iTest_01 EURUSD,Weekly: i=1 E0=2147483647 E1=101 E2=102 E3=103
iTest_01 EURUSD,Weekly: i=2 E0=2147483647 E1=2147483647 E2=102 E3=103

There is a very strange value"214....".
Why the empty array will start with "214...." rather then 0??

XML feed