Learn Basic Language

History

Basic is a very powerful language as a tool for the novice programmer. Basic allows for a wide range of applications, and it has many versions. However, as long as the emphasis is on the techniques of programming and problem solving, the specific syntax is easy to follow.

Significant Language Features

Basic is a multi-platform language because many basic compilers use the same types of routines. Basic allows:

    • Loops

    • Input from the keyboard

    • Menu Driven Applications

    • System Commands - These are words that make the system perform a specific task immediately.

    • Structured Programming

  • Subroutines

    • Built-In Functions

    • User-Defined Functions

  • Arrays, sorting, and searches

Areas of Application

  • Basic has many strong points, such as:

    • Easy to learn for beginners

    • Adds powerful additional features for the advanced user

    • Is designed for interactive use rather than batch work

  • Lends itself to learning by hands-on practical use

and is therefore suitable for both the professional and non-professional.

Hello World Example program

This program prints the phrase "Hello World" infinitely.

Sample code

10 PRINT "Hello World!"

20 GOTO 10

Sample run

Hello World!

Hello World!

Hello World! etc., etc....

Arithmetic Operations Example Program

This program performs basic arithmetic operations.

Sample Code

10 INPUT "ENTER TWO NUMBERS SEPARATED BY A COMMA:

20 LET S = N1 + N2

30 LET D = N1 - N2

40 LET P = N1 * N2

50 LET Q = N1 / N2

60 PRINT "THE SUM IS ", S

70 PRINT "THE DIFFERENCE IS ", D

80 PRINT "THE PRODUCT IS ", P

90 PRINT "THE QUOTIENT IS ", Q

100 END

Sample Run

ENTER TWO NUMBERS SEPARATED BY A COMMA:

4 2

THE SUM IS 6

THE DIFFERENCE IS 2THE PRODUCT IS 8THE QUOTIENT IS 2

HOME NEXT