manpagez: man pages & more
info Octave-FAQ
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.7 Exclamation mark as not operator

The exclamation mark '!' (aka “Bang!”) is a negation operator, just like the tilde '~':

 
octave:1> if ! strcmp (program_name, "octave"),
>   "It's an error"
> else
>   "It works!"
> end
ans = It works!

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.