1-BASIC ProgrammingBeginning BASICYour First Program PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

BASIC Programming/Beginning BASIC/Your First

Program
en.wikibooks.org/wiki/BASIC_Programming/Beginning_BASIC/Your_First_Program
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
1. Cls stands for 'Clear Screen' and erases everything in the Command Prompt.
2. Print displays everything in between the quotations.
3. Sleep makes the program wait until the user presses Enter (Return).
4. End marks the end of the program (explained later in functions.)
External Links
Wikipedia's article on Hello World
Index Next: Beginning BASIC/PRINT, CLS, and END
<img src="http://en.wikibooks.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" title=""
width="1" height="1" style="border: none; position: absolute;">

You might also like