Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 26 lines (15 sloc) 0.416 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#! nqp

# check control structure 'unless'

say('1..6');

unless 0 { say("ok 1 # on one line"); }

say("ok 2 # statements following unless are okay");

unless 0 {
    say("ok 3 # multi-line unless");
}

unless 1 {
    print("not ");
}
say("ok 4 # testing conditional");

say("ok 5 # postfix statement modifier form (false)") unless 0;

print("not ") unless 1;

say("ok 6 # postfix statement modifier form (true)");

Something went wrong with that request. Please try again.