ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


new:ternary

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
new:ternary [2018/02/18 18:28] korshunnew:ternary [2018/02/18 18:28] korshun
Line 5: Line 5:
 ''any cond(bool condition, any whentrue, any whenfalse)'' ''any cond(bool condition, any whentrue, any whenfalse)''
  
-If ''condition'' is true, function returns ''whentrue'', otherwise it retuns ''whenfalse''.+If ''condition'' is true, it returns ''whentrue'', otherwise it retuns ''whenfalse''.
  
 The only difference is that all arguments are evaluated before the function is called. This means that ''cond(x, f(), g())'' will call both ''f()'' and ''g()'', while ''x ? f() : g()'' will call only one of them. The only difference is that all arguments are evaluated before the function is called. This means that ''cond(x, f(), g())'' will call both ''f()'' and ''g()'', while ''x ? f() : g()'' will call only one of them.
new/ternary.txt · Last modified: 2018/02/18 18:31 by korshun