mirror of
https://github.com/holub/mame
synced 2025-04-26 02:07:14 +03:00
![]() Comparison operators evaluate either into 0.0 or 1.0. Thus they can be used like "(a==1)*(b==2)" which will only result in 1.0 if a equal 1 and b equal 1. From the yet to be released test code: * PFUNCEXPECT("1==1", 1.0) * PFUNCEXPECT("1 *0 == 2-1-1", 1.0) * PFUNCEXPECT("0!=1", 1.0) * PFUNCEXPECT("0<1", 1.0) * PFUNCEXPECT("1>0", 1.0) * PFUNCEXPECT("0<=1", 1.0) * PFUNCEXPECT("1>=0", 1.0) * PFUNCEXPECT("1<=1", 1.0) * PFUNCEXPECT("1>=1", 1.0) * PFUNCEXPECT("if(1>0, 2, 0)", 2.0) * PFUNCEXPECT("if(0>1, 2, 3)", 3.0) * PFUNCEXPECT("if(sin(1)>0, 2, 3)", 3.0) // fail |
||
---|---|---|
.. | ||
devices | ||
emu | ||
frontend/mame | ||
lib | ||
mame | ||
osd | ||
tools | ||
zexall |