< BASIC Programming < Beginning BASIC
Introduction
Many texts written about programming languages show you a sample program at the beginning of the lesson to help get your feet wet. That is, to become familiar with the syntax and layout of that language. This book is no exception. This sample program will display the text "Hello, world!" to your screen.
Program Examples
Example One (FreeBASIC)
10 cls
20 print "Hello, world!"
30 sleep
40 end
.
Explanation
- cls stands for 'Clear Screen' and erases everything in the Command Prompt.
- print displays everything in between the quotations.
- sleep makes the program wait until the user presses Enter (Return).
- end marks the end of the program (explained later in functions.)
External Links
Wikipedia's article on Hello World
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.