UpNext

10.7.1  ?? ::

The simplest Mythryl conditional expression is ... ?? ... :: ... which corresponds exactly to the C ... ? ... : ... conditional expression:

    linux$ my

    eval:  1 == 1 ?? "red" :: "green"

    "red"

    eval:  1 == 2 ?? "red" :: "green"

    "green"

Unlike in C or Perl, Mythryl boolean expressions must evaluate to TRUE or FALSE; Mythryl does not allow you to use integer zero to mean FALSE nor integer one to mean TRUE.


Comments and suggestions to: bugs@mythryl.org

UpNext