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 INPUT " Enter Your Name ", X
30 PRINT X = " YOUR NAME"
40 END
.
Explanation
- CLS stands for 'Clear Screen' and erases everything in the Command Prompt.
- PRINT displays everything in between the quotations.
- INPUT gives input and tell what to do.
- END marks the end of the program (explained later in functions.)
External Links
Wikipedia's article on Hello World
Category:Book:BASIC Programming#Beginning%20BASIC/Your%20First%20Program%20