Created
May 8, 2011 04:01
-
-
Save zmughal/961086 to your computer and use it in GitHub Desktop.
Note to self: more syntax can make things clean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this | |
if($data_pos < @data) { | |
# data on line | |
$self->window()->addstr($data[$data_pos]); | |
} else { | |
# tilde on line | |
$self->window()->addstr("~"); | |
} | |
# or this | |
$self->window()->addstr($data[$data_pos] // "~"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment