Let's say I get value from a prompt?
\prompt 'Write [Yes] or [No]\n' store
Which does this,
Write [Yes] or [No]
Yes
I can verify I have that works,
\echo :store
Yes
But, I can't get it to work with \if
\if :store='Yes'
unrecognized value "Yes=Yes" for "\if expression": Boolean expected
\prompt
's doc don't say much on this
\prompt [ text ] name
Prompts the user to supply text, which is assigned to the variable name. An optional prompt string, text, can be specified. (For multiword prompts, surround the text with single quotes.)By default, \prompt uses the terminal for input and output. However, if the -f command line switch was used, \prompt uses standard input and standard output.
\if :store
and that requiresstore
to contain something that can be converted to a boolean. Plus the manual also says: "A conditional block must begin with an\if
and end with an\endif
"