
// Script function: Example of application of Reference Parameters

// 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

void EMfunc(number EMi) // without "&"
{
EMi = 10; // this line modifies calling argument, but it is useless here.
}

number EMvalue = 1;
result ("Old value for EMvalue: " + EMvalue + "\n")
EMfunc(EMvalue); // pass the value (EMvalue = 1) of EMvalue to EMfunc()
result ("New value for EMvalue: " + EMvalue + "\n\n")

