From: Jon <devout1977@gm...> - 2011-09-19 16:24:46
I use macro to control whether output to a file or on screen by defining a
variable debug. I would like to output a string on screen to remind me where
the output is by writing code like
debug = ''
print (debug=='#' ? 'output in file' : 'output on screen')
However, gnuplot complains that
Non-numeric string found where a numeric expression was expected
How can I possibly circumvent this error and get what I want, thanks!
On 19.09.2011 18:24, Jon wrote:
> print (debug=='#' ? 'output in file' : 'output on screen')
> However, gnuplot complains that
> Non-numeric string found where a numeric expression was expected
Of course it does. == is an operator for numbers, but you're passing it
strings. Please see "help expressions operators binary" for the
operator you really need.