fredag den 11. september 2009

Hello world

Hello world is typically the first testprogramme you write to see how a tecnique works and this blog is dedicated to first testprogrammes in all kind of languages some of them are easy and others might be a bit more complecated.
If you have ideas to a good blogpost then write me.
But lets get startet.
The first "Hello world" is a batch script - very very simple.
1. Make a .bat-file. The easiest way is to rightclick in a directory and pick New -> Text Document . Rename the file to HelloWorld.Bat.








notice: if you dont see the .txt extension in the filename you have to setup windows to see known extensions.
2. rightclick the file and select edit
3. in the fileeditor (typically notepad from standard) write following:
@echo off
echo Hello World
pause
4. close the editor and doubleclick the file


And now.. What actually happens.

The first line @echo off actually tells the system not to write anything unless you tell it to. The @-sign is only there to keep it from writing that line.. Confusing? Well maybe :-)

The second line echo Hello World tells the system to write Hello World.

The last line - pause tells the system to wait for a userinput.


Your first Hello World .. here you go :-)

Ingen kommentarer:

Send en kommentar