
// Script function: Comparison of applications between ? operator and if-else statements.
//equivalent script: https://www.globalsino.com/EM/page2597_if_else.s

// 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 x

while((round(10*random())) != 9 )
{
x = (round(random() < 0.5)) ? 0 : 1
}
result (x + "\n")

//equivalent script: https://www.globalsino.com/EM/page2597_if_else.s