// Script function: Enter a number to test two different return statements for the same function "number EMadd"

// 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


number EMadd( number EMa, number EMb )
{
number EMNumber
GetNumber("Enter a number (1~9?):", 1967, EMNumber) // compare input of 1~9 range with non "1~9" range 

number EMt
for(EMt=1; EMt <10; EMt++) 
{
result (EMt + "\n")

if (EMt == EMNumber) return (EMa + EMb)
}
return -1
}

number EMc
number EMd
EMc = 1
EMd = 2

result ("The sum of EMa and EMb is: " + EMadd (EMc, EMd))
