5 # compile time evaluation
7 if (int(1.234) == 1) {print "ok 1\n";} else {print "not ok 1\n";}
9 if (int(-1.234) == -1) {print "ok 2\n";} else {print "not ok 2\n";}
14 if (int($x) == 1) {print "ok 3\n";} else {print "not ok 3\n";}
15 if (int(-$x) == -1) {print "ok 4\n";} else {print "not ok 4\n";}
17 $x = length("abc") % -10;
18 print $x == -7 ? "ok 5\n" : "# expected -7, got $x\nnot ok 5\n";
22 $x = length("abc") % -10;
23 print $x == 3 ? "ok 6\n" : "# expected 3, got $x\nnot ok 6\n";