01 — Hello: say your first words
This is your first program. Nothing to install, and no knowledge of computers
needed. NME puts whatever follows show on the screen. No quotes, no brackets.
Steps
Open needmoreeasy.com. There is a writing box. Type this into it:
run it →show Hello world!Press Run.
Hello world!appears below. That is all of it — you have just written a program and run it.Nothing here can break anything, and what you write never leaves the tab.
showis the thing to do, and the rest of the line is what to say. Change the words:
run it →show I wrote my first program todayKorean works the same way, with the action at the end of the line instead:
run it →안녕하세요! 말해줘You may mix the two languages in one file. There is nothing to set.
A line that reads as an ordinary sentence needs no action word at all:
run it →Hello everyone! 오늘도 반가워요!Several lines run from top to bottom, in order:
run it →show This is the first line show This is the second lineA line that starts with a
#does nothing at all. The computer skips it. It is a note left for a person to read:
run it →# This line does nothing at all. show Hello world!Running that prints one line,
Hello world!. Delete every#line and the program does exactly the same thing. Examples often have several of them at the top: those are the explanation, not the program.
Try it
Change the words to your own name, or a place you like, and press Run again. A three-line introduction of yourself is a good first program.
To keep what you wrote, move it into File 1 with the button above the writing box. That file stays in your browser, so opening an example to look at it will not take your work away.
If you installed it on your own computer (skip this for now)
Once install is done, the same program runs from a file. Put
the lines in hello.nme and:
nme run hello
nme r hello is the short form of the same command. You do not need any of
this while you are learning — the result is the same as on the site.
What you learned
- Whatever follows
showappears on the screen; Korean puts말해줘at the end. - Sentences need no quotes, no commas and no brackets.
- A line that reads as an ordinary sentence prints itself.
- Several lines run from top to bottom.
- A line starting with
#does nothing: it is a note for a person to read. - Everything works on needmoreeasy.com with nothing installed.