Keyboard input/Obtain a Y or N response: Difference between revisions

add Mathematica
m (→‎{{header|Vedit macro language}}: Wee Basic has been added, placed below.)
(add Mathematica)
Line 993:
end</lang>
 
 
=={{header|Mathematica}}==
<lang Mathematica>CreateDialog[TextCell["Yes or no?[Y/N]"],
NotebookEventActions -> {
"KeyDown" :> Switch[ToUpperCase@CurrentValue["EventKey"],
"Y", Print["You said yes"]; DialogReturn[],
"N", Print["You said no"]; DialogReturn[]
]}];</lang>
 
=={{header|M2000 Interpreter}}==
Anonymous user