Inverted syntax: Difference between revisions

Tcl doesn't do this
(initial content)
 
(Tcl doesn't do this)
Line 15:
print 'Wow! Lucky Guess!' if ($guess == 6); # Inverted syntax (note missing braces)
unless ($guess = 6) { print "Sorry, your guess was wrong!"; } # Traditional syntax
print 'Huh! You Guessed Wrong!' unless ($guess == 6); # Inverted syntax</lang>
</lang>
 
{{omit from|Tcl|The language syntax really doesn't allow this.}}
[[Category:Inverted syntax]]
Anonymous user