Unless

unless

1 Perl[ | ]

$a = 0;
unless ($a) {
    printf("false\n");
} else {
    printf("true\n");
}
  • one-line
print 'hello' unless 1;
print 'world' unless 0;
# world

2 Ruby[ | ]

a = false
unless a
    puts "false"
else
    puts "true"
end
  • one-line
print 'hello' unless true
print 'world' unless false
# world

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}