Older Newer
Tue, 26 May 2015 08:37:55 . . . . afh [Clarify the initialization of global variables]


Changes by last author:

Added:
= All global, session persistent variables that are predefined in FilterMeister =

<code>

int i0, i1, i2, i3, i4, i5, i6, i7, i8, i9;

int j0, j1, j2, j3, j4, j5, j6, j7, j8, j9;

int k0, k1, k2, k3, k4, k5, k6, k7, k8, k9;

double x0, x1, x2, x3, x4, x5, x6, x7, x8, x9;

double y0, y1, y2, y3, y4, y5, y6, y7, y8, y9;

double z0, z1, z2, z3, z4, z5, z6, z7, z8, z9;

char str0[256];

char str1[256];

char str2[256];

char str3[256];

char str4[256];

char str5[256];

char str6[256];

char str7[256];

char str8[256];

char str9[256];

char str10[256];

char str11[256];

char str12[256];

char str13[256];

char str14[256];

char str15[256];

char str16[256];

char str17[256];

char str18[256];

char str19[256];

</code>

These variables are initialized to zero upon first entry to the plug-in within the current host session. Global integer variables are initialized to 0, global floating-point variables are initialized to 0.0, global pointer variables are initialized to NULL, and global arrays are initialized to the default value of each array element. For example, global character arrays (also known as C strings) are initialized to the null string.

If you wish to initialize a global variable with a nonzero value, you can do so in the OnFilterStart handler when the filter is executed for the first time. For %fml-language code, you can also initialize global variables within a file-level declaration, or by an executable statement at file-level if the variable has already been declared.

== Processing Variables ==

abort_mode - Chooses the method the filter will use to quit execution when abort() is called. Only available in FM1.0 Beta 9g MT4 onwards.