

// Script function: Demo of local variable.


// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html



/*
The variable x here is declared twice, once in main( ) and once in EMFunction( ).
Changes to the x inside EMFunction( ) will not affect the x inside main( ).
The x inside EMFunction is a local variable.
*/


void EMFunction();
void main()
{
number x; // local to main()
x = 1967;
EMFunction();
result ( "x in main()" + x + "\n\n")// displays 10
return;
}
void EMFunction()
{
number x; // local to func()
x = -1967;
result ("x for func()" + x +"\n"); // displays -199
}

main ()