Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (19 sloc) 459 Bytes
#!./parrot nqp.pbc
# Testing boolean context operators, ! and ?
ok(!0, 'prefix negation on integer 0');
if !1 {
ok(1, "negating integer 1");
ok(!!1, 'double negation on 1');
##Boolean context
ok(?1, 'prefix negation on integer 1');
ok(?"10", 'prefix negation on string 10');
ok(?"0", 'prefix negation on string 0');
if ?0 {
ok(1, "boolean integer 0");
ok(!?!?1, 'spaghetti chaining');
Jump to Line
Something went wrong with that request. Please try again.