by david
20. November 2011 17:01
As I have mentioned before, I have been adding User Input to my new programming language, codenamed DALIS. Because the language is designed to work in a request / response environment I wanted the language to reflect that without getting over complicated. So this is what I have got at the moment:
WRITE "Welcome to another DALIS program."+RETURN
ASK "Type your name and press ENTER: "
name = ANSWER
IF name="Dave"
WRITE RETURN+"Good morning Dave."
OTHERWISE
WRITE RETURN+"Hello "+name+"."
END
The ASK ... ANSWER syntax looks pretty straightforward to me. If I run this program, this is what happens:

Then I put in a name:

Finally, this is the end result:

It seems to work fine. Simple code which even runs on my phone. I also have a plan to enable forms, so that you can submit several values at once. That is for another day though...