SlideShare a Scribd company logo
BASIC
Includes Visual BASIC, VB.net, QuickBasic,
PowerBasic, GW Basic, PowerBASIC and the
BASIC Programming Language
Shane Estavillo
Jeffrey James Valerio
BASIC
eginner
ā€™sll
Purposeymboli
c
nstructionod
e
It is a family of high-level programming languages, in other words, a multi
platform language.
One of the earliest and simplest high-level languages with commands
similar to English. It can be learned with relative ease even by
schoolchildren and novice programmers.
It is in widespread use but has gotten little respect.
BASIC
The language was based partly on the
FORTRAN IV and partly on the ALGOL
60, with additions to make it suitable for
timesharing.
FORTRAN
IV (1962)
ALGOL 60
(1960
BASIC
(1964)
Genealogy of BASIC
The language was based partly on the
FORTRAN IV and partly on the ALGOL
60, with additions to make it suitable for
timesharing.
BASI
C
(1964
)
QuickBASIC
(1988)
Visual
BASIC
(1990)
BASIC was first implemented on
the GE-265 mainframe which
supported multiple terminals.
Original BASIC Language
Overview
Very small and oddly, was not
interactive.
No means of getting input data from
terminal.
Programs were typed in, compiled and
run, in sort of batch-oriented way.
Had only 14 different statement types
and a single data type, floating point,
referred to as ā€œnumbersā€.
Overall, it was very limited language
though quite easy to learn.
Significant Language
Features
Loops
Input from the keyboard
Menu Driven Applications
System Commands - These are words
that make the system perform a
specific task immediately.
Significant Language
Features
User-Defined Functions
Arrays, sorting, and searches
Areas of Application
BASIC has many strong points, such as:
Easy to learn for beginners
Structured Programming
Subroutines
Built-In Functions
Significant Language
Features
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.
The goals of the system were:
1. It must be easy for non-science
students to learn and use.
2. It must be pleasant and friendly.
3. It must provide fast turnaround for
homework.
4. It must allow free and private access.
5. It must consider user time more
important than computer time.
The eight design principle of
BASIC:
1. Be easy for beginners to use.
2. Be a general-purpose programming
language.
3. Allow advanced features to be added for
experts (while keeping the language simple
for beginners).
4. Be interactive.
5. Provide clear and friendly error messages.
6. Respond quickly for small programs.
7. Not to require an understanding of
computer hardware.
8. Shield the user from the operating system.
Evaluation and Criticisms
Poor structure of programs written in
it.
Early versions were not meant for
serious programs of any significant
size, though later versions can handle
such tasks.
Edsger W. Djikstra, a highly-respected
computer proffessional that the use of
GoTo statements, particularly in
BASIC, promoted poor programming
practices.
Then why BASIC is
successful?
Ease with which it can be learned and
the ease with which it can be
implemented, even on very small
computers.
The original
BASIC was
designed in 1964
by John George
Kemeny (right)
and Thomas
Eugene Kurtz
(left) at Dartmouth
College (now
Dartmouth
University) in New
Hampshire, USA
Brief History of BASIC
Before the mid-1960s, computers were
extremely expensive and used only for
special-purpose tasks.
As prices decreased, from research
aabs, computing went into commercial
use.
Newer computer systems then supported
time-sharing, a system that allows
multiple users or processes to use
the CPU and memory.
Brief History of BASIC
In the following years, as other dialects
of BASIC appeared, Kemeny and Kurtzā€™s
original BASIC dialect became known as
Dartmouth BASIC.
When it was implemented in
minicomputers DEC PDP Series and the
Data General Nova; HP-Time Shared
BASIC System (1960s), BASIC acted
merely as an interpreter rather than a
compiler.
DEC-PDP
ALTAIR 8800
NOVA
SYSTEM
Brief History of BASIC
It was the introduction of Altair 8800
ā€œkitā€ microcomputer in 1975 that
provided BASIC a path to
universality.
BASIC provided faster memory
access for audio tapes and suitable
text editors that time.
Brief History of BASIC
In order to promote the language, it
was available FREE OF CHARGE.
One of the first to appear was the Tiny
Basic originally written by Li-Chen
Wang, a simple BASIC
implementation. For 8080 machines
like the Altair.
Brief History of BASIC
MITS then released Altair BASIC,
developed by Bill Gates and Paul
Allen in 1975.
Microsoft BASIC (widely known as
MBASIC or M BASIC)was soon
bundled with an original floppy disk
based CP/M computers.
Brief History of BASIC
The Atari 8-bit family had their own
Atari BASIC that was modified in order
to fit on 8 kB ROM cartridge.
The BBC published BBC BASIC,
developed for them by Acorn
Computers Ltd, incorporating many
extra structuring keywords.
Atari BASIC
Brief History of BASIC
As early as 1979 Microsoft was in
negotiations with IBM to supply them
with a version of BASIC. Microsoft
sold several versions of BASIC for
MS-DOS/ PC-DOS including BASICA,
GW-BASIC (a BASICA-compatible
version that did not need IBM's ROM)
and QuickBASIC.
Brief History of BASIC
IBM BASIC UI
Brief History of BASIC
Turbo Pascal & Turbo C++-publisher
Borland published Turbo BASIC 1.0 in
1985 (successor versions are still
being marketed by the original author
under the name PowerBASIC).
Brief History of BASIC
These languages introduced many
extensions to the original home
computer BASIC, such as improved
string manipulation and graphics
support, access to the file system and
additional data types. More important
were the facilities for structured
programming, including additional
control structures and proper
subroutines supporting local variables.
The Shift of BASIC into Visual
BASIC
The Visual BASIC introduced by
Microsoft is difficult to consider to be
really the original BASIC, since of its
major shift towards being object-
oriented and event-driven in
perspective.
VB Version 3.0 is widely considered
the first relatively stable version.
Basic BASIC Syntax
SYNTAX
TYPICAL BASIC KEYWORDS
Data manipulation
LET: assigns a value (which may be
the result of an expression) to a
variable.
DATA: holds a list of values which are
assigned sequentially using the READ
command.
Program flow control
IF ... THEN ... ELSE: used to perform comparisons or
make decisions.
FOR ... TO ... {STEP} ... NEXT: repeat a section of code
a given number of times. A variable that acts as a
counter is available within the loop.
WHILE ... WEND and REPEAT ... UNTIL: repeat a
section of code while the specified condition is true. The
condition may be evaluated before each iteration of the
loop, or after.
DO ... LOOP {WHILE} or {UNTIL}: repeat a section of
code Forever or While/Until the specified condition is
true . The condition may be evaluated before each
iteration of the loop, or after.
GOTO: jumps to a numbered or labelled line in the
program.
Program flow control
GOSUB: jumps to a numbered or labelled line, executes
the code it finds there, but upon encountering the
RETURN Command, it jumps back to the line following
the line from which the jump occurred. This is used to
implement subroutines.
ON ... GOTO/GOSUB: chooses where to jump based
on the specified conditions. See Switch statement for
other forms.
DEF FN: a pair of keywords introduced in the early
1960s to define functions. The original BASIC functions
were modelled on FORTRAN single-line functions.
BASIC functions were one expression with variable
arguments, rather than subroutines, with a syntax on
the model of DEF FND(x) = x*x at the beginning of a
program. Function names were restricted to FN+one
letter.
I/O: Input and Output
PRINT: displays a message on the
screen or other output device.
INPUT: asks the user to enter the
value of a variable. The statement
may include a prompt message.
TAB or AT: sets the position where the
next character will be shown on the
screen or printed on paper.
Miscellaneous Syntax
REM: holds a programmer's comment or REMark; often
used to give a title to the program and to help identify
the purpose of a given section of code.
USR: transfers program control to a machine language
subroutine, usually entered as an alphanumeric string
or in a list of DATA statements.
TRON: turns on a visual, screen representation of the
flow of BASIC commands by displaying the number of
each command line as it is run. The TRON command,
largely obsolete now, stood for, TRace ON. This meant
that command line numbers were displayed as the
program ran, so that the command lines could be
traced. This command allowed easier debugging or
correcting of command lines that caused problems in a
program.
Miscellaneous Syntax
Problems included a program terminating without
providing a desired result, a program providing
an obviously erroneous result, a program running
in a non-terminating loop, or a program otherwise
having a non-obvious error. (The command
TRON has also entered popular cultural with the
name of the 1982 Disney movie, "TRON," with a
subsequent movie, "TRON: Legacy," a television
series, "TRON: Uprising," and two video games,
"TRON: Legacy," and "TRON:Evolution." In each
of these entertainments the TRON command is
personified as a character that battles against
evil elements in programs.)
TROFF: turns off the display of the number of
each command line as command lines run after
the command TRON has been used.
DATA TYPES AND VARIABLES
Minimal versions of BASIC had only integer variables and one-letter
variable names. More powerful versions had floating-point
arithmetic, and variables could be labelled with names six or more
characters long.
String variables are usually distinguished in many microcomputer
dialects by having $ suffixed to their name, and string values are
typically enclosed in quotation marks.
Arrays in BASIC could contain integers, floating point or string
variables.
Some dialects of BASIC supported matrices and matrix operations,
useful for the solution of sets of simultaneous linear algebraic
equations. These dialects would support matrix operations such as
assignment, addition, multiplication (of compatible matrix types), and
evaluation of a determinant. Microcomputer dialects often lacked this
data type and required a programmer to provide subroutines to carry
out equvalent operations.
BASIC (PROGRAMMING LANGUAGE) IS AN EARLIER VERSION
OF VISUAL BASIC. VB IS MODIFIED FOR PC USER U CAN SAY
IT IS A GUI VERSION OF BASIC.
Sample
BASIC
Implementatio
n
The next set of
discussions are
directly based on
the Original
Manual of the
BASIC
Programming
Language
designed for use
in the Darthmouth
Time-Sharing
BASIC Programming
Observations
s
Expressions, Numbers and
Variables
Expressions, Numbers and
Variables
Expressions, Numbers and
Variables
Expressions, Numbers and
Variables
Expressions, Numbers and
Variables
Expressions, Numbers and
Variables
Parentheses
LET Function
Read and Data Functions
PRINT Functions
Print Functions
GO TO (Looping) & If-Then
GO TO (Looping) & If-Then
FOR and Next
FOR and Next
END Function
Revising Errors
Types of BASIC
Unstructured BASIC
Structured BASIC
Object-Oriented BASIC or Visual
BASIC
Unstructured BASIC
These are the first-generation BASIC
languages such as MSX BASIC and
GW BASIC.
Most support:
Simple Data Types
Loop Cycles
Arrays
10 PRINT "Hello World! "
20 GOTO 10
Sample Program for GW
BASIC
Hello World !Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
Hello World! Hello World! Hello World!
10 PRINT "Hello World! "
20 GOTO 10
This program prints the phrase ā€œHello
World! ā€œ infinitely.
Sample Program for GW
BASIC
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 Program for GW
BASIC
ENTER TWO NUMBERS SEPARATED BY A COMMA:
THE SUM IS 6
THE DIFFERENCE IS 2
THE PRODUCT IS 8
THE QUOTIENT IS 2
Structured BASIC
Second Generation BASICs are
structured and procedure-oriented
programming.
Line numbering is omitted and then
replaced with labels for GoTo and
procedure.
QuickBASIC and PowerBASIC are
examples.
Sample PowerBASIC
Program
Function PBMain
Print "Hello, World!"
Waitkey$
End Function
Sample QuickBASIC Program
#COMPILE EXE
Function PBMain() as Long
MsgBox "Hello World"
End Function
BASIC with Object-Oriented
features
Third generation BASIC dialects such
as Visual Basic and StarOffice Basic
introduced features to support object-
oriented and event-driven
programming paradigm.
Most built-in procedures and functions
now represented as methods of
standard objects rather than operators
.
Visual BASIC
Visual basic is derived form the BASIC
programming languages, it is a Microsoft
window programming language, visual
basic program are created in an
integrated development environment
(IDE), which allows the programmer to
create run and design visual basic
programs conveniently itā€™s also allow a
programmer to create working programs
in a fraction of time that normally takes to
code programs without using IDES.
Visual BASIC
The wide spread use of BASIC
Language with various types of
computer (sometimes called hardware
platform) led to many enhancement to
the languages with the development of
Microsoft windows graphical user
interface (GUI) in the late 1980ā€™s and
the early 1990ā€™s, the natural evolution
of basic was visual basic which was
created by Microsoft corporation in
1991.
Procedural BASIC: True
BASIC
True BASIC, C, Fortran, and Pascal are
examples of procedural languages. Procedural
languages change the state or memory of the
machine by a sequence of statements. True
BASIC is similar to F (a subset of Fortran 90) and
has excellent graphics capabilities which are
hardware independent. True BASIC programs
can run without change on computers running
the Macintosh, Unix, and Windows operating
systems. We will consider version 3.0 (2.7 on the
Macintosh) of True BASIC. Version 5 includes
the ability to build objects such as buttons, scroll
bars, menus, and dialog boxes. However,
because we wish to emphasize the similarity
between True BASIC and other procedural
languages such as C, F, and Java, we do not
consider these features.
Procedural BASIC: True
BASIC
PROGRAM product
! taken from Chapter 2 of Gould &
Tobochnik
LET m = 2 ! mass in
kilograms
LET a = 4 ! acceleration in
mks units
LET force = m*a ! force in
Newtons
PRINT force
END
Procedural BASIC: True
BASIC
The features of True BASIC included
in the above program include:
The first statement is an optional
PROGRAM header. The inclusion of a
program header is good programming
style.
Procedural BASIC: True
BASIC
Comment statements begin with ! and
can be included anywhere in the
program.
PROGRAM, LET, PRINT, and END
are keywords (words that are part of
the language and cannot be
redefined) and are given in upper
case. The case is insignificant (unlike
C, F, and Java). The DO FORMAT
command converts keywords to upper
case.
Procedural BASIC: True
BASIC
The LET statement causes the
expression to the right of the = sign to be
evaluated and then causes the result to
be assigned to the left of the = sign. (The
LET statement reminds us that the
meaning of the = symbol is not the same
as equals.) It is not necessary to type
LET, because the DO FORMAT
command automatically inserts LET
where appropriate. The LET statement
can be omitted if the OPTION NOLET
statement is included.
Procedural BASIC: True
BASIC
True BASIC does not distinguish
between integer numerical variables and
floating point numerical variables and
recognizes only two types of data:
numbers and strings (characters). The
first character of a variable must be a
letter and the last must not be an
underscore.
The PRINT statement displays output on
the screen.
The last statement of the program must
be END.
Sample True BASIC with
input
PROGRAM product2
INPUT m
INPUT prompt "acceleration a (mks
units) = ": a
LET force = m*a ! force
in Newton's
PRINT "force (in Newtons) ="; force
END
Visual BASIC
Visual basic is the worlds most widely use
RAD language, (Rapid Application
Development (RAD) is the process of rapidly
creating an application. Visual Basic provide
a powerful features such as graphical user
interface, events handling assess to Win 32
API, object-oriented features, error handling,
structured programming and much more. Not
until Visual Basic appeared, developing
Microsoft windows based application was a
difficult and cumbersome process. Visual
basic greatly simplifies window application
development. The advantages of visual basic
programming language
Visual BASIC
VB 1.0 was introduced in 1991. The drag
and drop design for creating the user
interface is derived from a prototype form
generator developed by Alan Cooper and
his company called Tripod. Microsoft
contracted with Cooper and his
associates to develop Tripod into a
programmable form system for Windows
3.0, under the code name Ruby (no
relation to the Ruby programming
language).
Visual BASIC Features
Visual Basic gives a disciplined
approach to writing programs that are
clearer than unstructured programs,
easier to test, debug and can be easily
modify.
It allows for the creation of powerful
and professional looking application
with less time and coding. It allows for
strong typing i.e. has wide variety of
input data types and support Rapid
Application Development (RAD).
Visual BASIC Features
It has a complete edifying and debugging
facilities and has the ability to generate a
Dynamic Link Libraries (DLL`S), it
allows for easier management of
document and it is easy to learn.
Visual Basic is a complete form of
package for building user interface
Visual basic is a fairly easy language to
pick up. However, it is generally not used
to make very large applications. VB was
also created for MS Windows.
Sample VB Program
Private Sub Form_Load()
' Execute a simple message box
that says "Hello, World!"
MsgBox "Hello, World!"
End Sub
Visual Basic Timeline
REMEMBER
Please do not be mistaken by BASIC
and Visual BASIC.
BASIC (PROGRAMMING
LANGUAGE) IS AN EARLIER
VERSION OF VISUAL BASIC.
Visual BASIC is MODIFIED for
personal computer users, so we can
say that it is a GUI VERSION of
BASIC.
Prepared by:
Jeffrey James L. Valerio
Shane Estavillo

More Related Content

What's hot

C tokens
C tokensC tokens
C tokens
Manu1325
Ā 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
py7rjs
Ā 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Language
tahria123
Ā 
Assembly language
Assembly languageAssembly language
Assembly language
gaurav jain
Ā 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
Ā 
Assignment on basic programming language
Assignment on  basic programming languageAssignment on  basic programming language
Assignment on basic programming language
Guru buying house , Main branch ,Barishal.
Ā 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
Prabu U
Ā 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
avikdhupar
Ā 
Programming languages
Programming languagesProgramming languages
Programming languagesAkash Varaiya
Ā 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Neeru Mittal
Ā 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
Mansi Tyagi
Ā 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
Ashim Lamichhane
Ā 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
Sanay Kumar
Ā 
Computer Software & its Types
Computer Software & its Types Computer Software & its Types
Computer Software & its Types
Muhammad Hammad Waseem
Ā 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
Syed Zaid Irshad
Ā 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
REHAN IJAZ
Ā 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
Mahantesh Devoor
Ā 
Programming in ansi C by Balaguruswami
Programming in ansi C by BalaguruswamiProgramming in ansi C by Balaguruswami
Programming in ansi C by Balaguruswami
Priya Chauhan
Ā 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentation
ashanrajpar
Ā 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
sebrown
Ā 

What's hot (20)

C tokens
C tokensC tokens
C tokens
Ā 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
Ā 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Language
Ā 
Assembly language
Assembly languageAssembly language
Assembly language
Ā 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
Ā 
Assignment on basic programming language
Assignment on  basic programming languageAssignment on  basic programming language
Assignment on basic programming language
Ā 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
Ā 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
Ā 
Programming languages
Programming languagesProgramming languages
Programming languages
Ā 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Ā 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
Ā 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
Ā 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
Ā 
Computer Software & its Types
Computer Software & its Types Computer Software & its Types
Computer Software & its Types
Ā 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
Ā 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
Ā 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
Ā 
Programming in ansi C by Balaguruswami
Programming in ansi C by BalaguruswamiProgramming in ansi C by Balaguruswami
Programming in ansi C by Balaguruswami
Ā 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentation
Ā 
Generations Of Programming Languages
Generations Of Programming LanguagesGenerations Of Programming Languages
Generations Of Programming Languages
Ā 

Similar to BASIC Programming Language

First compailer written
First compailer writtenFirst compailer written
First compailer written
microwoorkers
Ā 
Programming lesson1
Programming lesson1Programming lesson1
Programming lesson1camfollower
Ā 
Compilers
CompilersCompilers
Compilers
Jayanga V. Liyanage
Ā 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
hamza239523
Ā 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Gwyneth Calica
Ā 
Ayushi
AyushiAyushi
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
DeepOad
Ā 
History of Computer Programming Languages.pptx
History of Computer Programming Languages.pptxHistory of Computer Programming Languages.pptx
History of Computer Programming Languages.pptx
AliAbbas906043
Ā 
Computer programming languages
Computer programming languagesComputer programming languages
Computer programming languages
SubramanianMuthusamy3
Ā 
Assembly
AssemblyAssembly
Assemblymanidangi
Ā 
Programming languages
Programming languagesProgramming languages
Programming languages
Fatima Abdul Rahman
Ā 
computerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxcomputerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptx
Subramanian Mani
Ā 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
Ā 
Cross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn UstepCross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn Ustepwangii
Ā 
Ctutor
CtutorCtutor
Ctutor
Fabio Junior
Ā 
Programming landuages
Programming landuagesProgramming landuages
Programming landuages
NataliaVasjuka
Ā 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .NetAmr Shawky
Ā 

Similar to BASIC Programming Language (20)

First compailer written
First compailer writtenFirst compailer written
First compailer written
Ā 
Programming lesson1
Programming lesson1Programming lesson1
Programming lesson1
Ā 
Compilers
CompilersCompilers
Compilers
Ā 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
Ā 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Ā 
Ayushi
AyushiAyushi
Ayushi
Ā 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler development
Ā 
History of Computer Programming Languages.pptx
History of Computer Programming Languages.pptxHistory of Computer Programming Languages.pptx
History of Computer Programming Languages.pptx
Ā 
Computer programming languages
Computer programming languagesComputer programming languages
Computer programming languages
Ā 
Assembly
AssemblyAssembly
Assembly
Ā 
Programming languages
Programming languagesProgramming languages
Programming languages
Ā 
computerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxcomputerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptx
Ā 
Ctutor ashu
Ctutor ashuCtutor ashu
Ctutor ashu
Ā 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
Ā 
Cross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn UstepCross Platform Objective C Development Using Gn Ustep
Cross Platform Objective C Development Using Gn Ustep
Ā 
Ctutor
CtutorCtutor
Ctutor
Ā 
Ctutor
CtutorCtutor
Ctutor
Ā 
Ctutor
CtutorCtutor
Ctutor
Ā 
Programming landuages
Programming landuagesProgramming landuages
Programming landuages
Ā 
Welcome to the .Net
Welcome to the .NetWelcome to the .Net
Welcome to the .Net
Ā 

Recently uploaded

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
Ā 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
Ā 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
Ā 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
Ā 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
Ā 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
Ā 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-UniversitƤt
Ā 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
Ā 
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
UiPathCommunity
Ā 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
Ā 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
Ā 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
Ā 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
Ā 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
UiPathCommunity
Ā 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
Ā 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
Ā 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
Ā 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
Ā 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
Ā 

Recently uploaded (20)

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
Ā 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Ā 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Ā 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
Ā 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Ā 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
Ā 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Ā 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Ā 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
Ā 
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder ā€“ active learning and UiPath LLMs for do...
Ā 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Ā 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Ā 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
Ā 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Ā 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilotā„¢
Ā 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Ā 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Ā 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Ā 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Ā 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Ā 

BASIC Programming Language

  • 1. BASIC Includes Visual BASIC, VB.net, QuickBasic, PowerBasic, GW Basic, PowerBASIC and the BASIC Programming Language Shane Estavillo Jeffrey James Valerio
  • 2. BASIC eginner ā€™sll Purposeymboli c nstructionod e It is a family of high-level programming languages, in other words, a multi platform language. One of the earliest and simplest high-level languages with commands similar to English. It can be learned with relative ease even by schoolchildren and novice programmers. It is in widespread use but has gotten little respect.
  • 3. BASIC The language was based partly on the FORTRAN IV and partly on the ALGOL 60, with additions to make it suitable for timesharing. FORTRAN IV (1962) ALGOL 60 (1960 BASIC (1964)
  • 4. Genealogy of BASIC The language was based partly on the FORTRAN IV and partly on the ALGOL 60, with additions to make it suitable for timesharing. BASI C (1964 ) QuickBASIC (1988) Visual BASIC (1990)
  • 5. BASIC was first implemented on the GE-265 mainframe which supported multiple terminals.
  • 6. Original BASIC Language Overview Very small and oddly, was not interactive. No means of getting input data from terminal. Programs were typed in, compiled and run, in sort of batch-oriented way. Had only 14 different statement types and a single data type, floating point, referred to as ā€œnumbersā€. Overall, it was very limited language though quite easy to learn.
  • 7. Significant Language Features Loops Input from the keyboard Menu Driven Applications System Commands - These are words that make the system perform a specific task immediately.
  • 8. Significant Language Features User-Defined Functions Arrays, sorting, and searches Areas of Application BASIC has many strong points, such as: Easy to learn for beginners Structured Programming Subroutines Built-In Functions
  • 9. Significant Language Features 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.
  • 10. The goals of the system were: 1. It must be easy for non-science students to learn and use. 2. It must be pleasant and friendly. 3. It must provide fast turnaround for homework. 4. It must allow free and private access. 5. It must consider user time more important than computer time.
  • 11. The eight design principle of BASIC: 1. Be easy for beginners to use. 2. Be a general-purpose programming language. 3. Allow advanced features to be added for experts (while keeping the language simple for beginners). 4. Be interactive. 5. Provide clear and friendly error messages. 6. Respond quickly for small programs. 7. Not to require an understanding of computer hardware. 8. Shield the user from the operating system.
  • 12. Evaluation and Criticisms Poor structure of programs written in it. Early versions were not meant for serious programs of any significant size, though later versions can handle such tasks. Edsger W. Djikstra, a highly-respected computer proffessional that the use of GoTo statements, particularly in BASIC, promoted poor programming practices.
  • 13. Then why BASIC is successful? Ease with which it can be learned and the ease with which it can be implemented, even on very small computers.
  • 14. The original BASIC was designed in 1964 by John George Kemeny (right) and Thomas Eugene Kurtz (left) at Dartmouth College (now Dartmouth University) in New Hampshire, USA
  • 15. Brief History of BASIC Before the mid-1960s, computers were extremely expensive and used only for special-purpose tasks. As prices decreased, from research aabs, computing went into commercial use. Newer computer systems then supported time-sharing, a system that allows multiple users or processes to use the CPU and memory.
  • 16. Brief History of BASIC In the following years, as other dialects of BASIC appeared, Kemeny and Kurtzā€™s original BASIC dialect became known as Dartmouth BASIC. When it was implemented in minicomputers DEC PDP Series and the Data General Nova; HP-Time Shared BASIC System (1960s), BASIC acted merely as an interpreter rather than a compiler.
  • 18. Brief History of BASIC It was the introduction of Altair 8800 ā€œkitā€ microcomputer in 1975 that provided BASIC a path to universality. BASIC provided faster memory access for audio tapes and suitable text editors that time.
  • 19. Brief History of BASIC In order to promote the language, it was available FREE OF CHARGE. One of the first to appear was the Tiny Basic originally written by Li-Chen Wang, a simple BASIC implementation. For 8080 machines like the Altair.
  • 20. Brief History of BASIC MITS then released Altair BASIC, developed by Bill Gates and Paul Allen in 1975. Microsoft BASIC (widely known as MBASIC or M BASIC)was soon bundled with an original floppy disk based CP/M computers.
  • 21. Brief History of BASIC The Atari 8-bit family had their own Atari BASIC that was modified in order to fit on 8 kB ROM cartridge. The BBC published BBC BASIC, developed for them by Acorn Computers Ltd, incorporating many extra structuring keywords.
  • 23. Brief History of BASIC As early as 1979 Microsoft was in negotiations with IBM to supply them with a version of BASIC. Microsoft sold several versions of BASIC for MS-DOS/ PC-DOS including BASICA, GW-BASIC (a BASICA-compatible version that did not need IBM's ROM) and QuickBASIC.
  • 26. Brief History of BASIC Turbo Pascal & Turbo C++-publisher Borland published Turbo BASIC 1.0 in 1985 (successor versions are still being marketed by the original author under the name PowerBASIC).
  • 27.
  • 28. Brief History of BASIC These languages introduced many extensions to the original home computer BASIC, such as improved string manipulation and graphics support, access to the file system and additional data types. More important were the facilities for structured programming, including additional control structures and proper subroutines supporting local variables.
  • 29. The Shift of BASIC into Visual BASIC The Visual BASIC introduced by Microsoft is difficult to consider to be really the original BASIC, since of its major shift towards being object- oriented and event-driven in perspective. VB Version 3.0 is widely considered the first relatively stable version.
  • 30.
  • 31. Basic BASIC Syntax SYNTAX TYPICAL BASIC KEYWORDS Data manipulation LET: assigns a value (which may be the result of an expression) to a variable. DATA: holds a list of values which are assigned sequentially using the READ command.
  • 32. Program flow control IF ... THEN ... ELSE: used to perform comparisons or make decisions. FOR ... TO ... {STEP} ... NEXT: repeat a section of code a given number of times. A variable that acts as a counter is available within the loop. WHILE ... WEND and REPEAT ... UNTIL: repeat a section of code while the specified condition is true. The condition may be evaluated before each iteration of the loop, or after. DO ... LOOP {WHILE} or {UNTIL}: repeat a section of code Forever or While/Until the specified condition is true . The condition may be evaluated before each iteration of the loop, or after. GOTO: jumps to a numbered or labelled line in the program.
  • 33. Program flow control GOSUB: jumps to a numbered or labelled line, executes the code it finds there, but upon encountering the RETURN Command, it jumps back to the line following the line from which the jump occurred. This is used to implement subroutines. ON ... GOTO/GOSUB: chooses where to jump based on the specified conditions. See Switch statement for other forms. DEF FN: a pair of keywords introduced in the early 1960s to define functions. The original BASIC functions were modelled on FORTRAN single-line functions. BASIC functions were one expression with variable arguments, rather than subroutines, with a syntax on the model of DEF FND(x) = x*x at the beginning of a program. Function names were restricted to FN+one letter.
  • 34. I/O: Input and Output PRINT: displays a message on the screen or other output device. INPUT: asks the user to enter the value of a variable. The statement may include a prompt message. TAB or AT: sets the position where the next character will be shown on the screen or printed on paper.
  • 35. Miscellaneous Syntax REM: holds a programmer's comment or REMark; often used to give a title to the program and to help identify the purpose of a given section of code. USR: transfers program control to a machine language subroutine, usually entered as an alphanumeric string or in a list of DATA statements. TRON: turns on a visual, screen representation of the flow of BASIC commands by displaying the number of each command line as it is run. The TRON command, largely obsolete now, stood for, TRace ON. This meant that command line numbers were displayed as the program ran, so that the command lines could be traced. This command allowed easier debugging or correcting of command lines that caused problems in a program.
  • 36. Miscellaneous Syntax Problems included a program terminating without providing a desired result, a program providing an obviously erroneous result, a program running in a non-terminating loop, or a program otherwise having a non-obvious error. (The command TRON has also entered popular cultural with the name of the 1982 Disney movie, "TRON," with a subsequent movie, "TRON: Legacy," a television series, "TRON: Uprising," and two video games, "TRON: Legacy," and "TRON:Evolution." In each of these entertainments the TRON command is personified as a character that battles against evil elements in programs.) TROFF: turns off the display of the number of each command line as command lines run after the command TRON has been used.
  • 37. DATA TYPES AND VARIABLES Minimal versions of BASIC had only integer variables and one-letter variable names. More powerful versions had floating-point arithmetic, and variables could be labelled with names six or more characters long. String variables are usually distinguished in many microcomputer dialects by having $ suffixed to their name, and string values are typically enclosed in quotation marks. Arrays in BASIC could contain integers, floating point or string variables. Some dialects of BASIC supported matrices and matrix operations, useful for the solution of sets of simultaneous linear algebraic equations. These dialects would support matrix operations such as assignment, addition, multiplication (of compatible matrix types), and evaluation of a determinant. Microcomputer dialects often lacked this data type and required a programmer to provide subroutines to carry out equvalent operations. BASIC (PROGRAMMING LANGUAGE) IS AN EARLIER VERSION OF VISUAL BASIC. VB IS MODIFIED FOR PC USER U CAN SAY IT IS A GUI VERSION OF BASIC.
  • 39.
  • 40. The next set of discussions are directly based on the Original Manual of the BASIC Programming Language designed for use in the Darthmouth Time-Sharing BASIC Programming
  • 41.
  • 42.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. s
  • 52.
  • 53.
  • 54.
  • 62.
  • 64. Read and Data Functions
  • 67. GO TO (Looping) & If-Then
  • 68. GO TO (Looping) & If-Then
  • 73. Types of BASIC Unstructured BASIC Structured BASIC Object-Oriented BASIC or Visual BASIC
  • 74. Unstructured BASIC These are the first-generation BASIC languages such as MSX BASIC and GW BASIC. Most support: Simple Data Types Loop Cycles Arrays
  • 75.
  • 76. 10 PRINT "Hello World! " 20 GOTO 10 Sample Program for GW BASIC
  • 77. Hello World !Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!
  • 78. 10 PRINT "Hello World! " 20 GOTO 10 This program prints the phrase ā€œHello World! ā€œ infinitely. Sample Program for GW BASIC
  • 79. 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 Program for GW BASIC
  • 80. ENTER TWO NUMBERS SEPARATED BY A COMMA: THE SUM IS 6 THE DIFFERENCE IS 2 THE PRODUCT IS 8 THE QUOTIENT IS 2
  • 81. Structured BASIC Second Generation BASICs are structured and procedure-oriented programming. Line numbering is omitted and then replaced with labels for GoTo and procedure. QuickBASIC and PowerBASIC are examples.
  • 82. Sample PowerBASIC Program Function PBMain Print "Hello, World!" Waitkey$ End Function
  • 83. Sample QuickBASIC Program #COMPILE EXE Function PBMain() as Long MsgBox "Hello World" End Function
  • 84. BASIC with Object-Oriented features Third generation BASIC dialects such as Visual Basic and StarOffice Basic introduced features to support object- oriented and event-driven programming paradigm. Most built-in procedures and functions now represented as methods of standard objects rather than operators .
  • 85.
  • 86. Visual BASIC Visual basic is derived form the BASIC programming languages, it is a Microsoft window programming language, visual basic program are created in an integrated development environment (IDE), which allows the programmer to create run and design visual basic programs conveniently itā€™s also allow a programmer to create working programs in a fraction of time that normally takes to code programs without using IDES.
  • 87. Visual BASIC The wide spread use of BASIC Language with various types of computer (sometimes called hardware platform) led to many enhancement to the languages with the development of Microsoft windows graphical user interface (GUI) in the late 1980ā€™s and the early 1990ā€™s, the natural evolution of basic was visual basic which was created by Microsoft corporation in 1991.
  • 88. Procedural BASIC: True BASIC True BASIC, C, Fortran, and Pascal are examples of procedural languages. Procedural languages change the state or memory of the machine by a sequence of statements. True BASIC is similar to F (a subset of Fortran 90) and has excellent graphics capabilities which are hardware independent. True BASIC programs can run without change on computers running the Macintosh, Unix, and Windows operating systems. We will consider version 3.0 (2.7 on the Macintosh) of True BASIC. Version 5 includes the ability to build objects such as buttons, scroll bars, menus, and dialog boxes. However, because we wish to emphasize the similarity between True BASIC and other procedural languages such as C, F, and Java, we do not consider these features.
  • 89. Procedural BASIC: True BASIC PROGRAM product ! taken from Chapter 2 of Gould & Tobochnik LET m = 2 ! mass in kilograms LET a = 4 ! acceleration in mks units LET force = m*a ! force in Newtons PRINT force END
  • 90. Procedural BASIC: True BASIC The features of True BASIC included in the above program include: The first statement is an optional PROGRAM header. The inclusion of a program header is good programming style.
  • 91. Procedural BASIC: True BASIC Comment statements begin with ! and can be included anywhere in the program. PROGRAM, LET, PRINT, and END are keywords (words that are part of the language and cannot be redefined) and are given in upper case. The case is insignificant (unlike C, F, and Java). The DO FORMAT command converts keywords to upper case.
  • 92. Procedural BASIC: True BASIC The LET statement causes the expression to the right of the = sign to be evaluated and then causes the result to be assigned to the left of the = sign. (The LET statement reminds us that the meaning of the = symbol is not the same as equals.) It is not necessary to type LET, because the DO FORMAT command automatically inserts LET where appropriate. The LET statement can be omitted if the OPTION NOLET statement is included.
  • 93. Procedural BASIC: True BASIC True BASIC does not distinguish between integer numerical variables and floating point numerical variables and recognizes only two types of data: numbers and strings (characters). The first character of a variable must be a letter and the last must not be an underscore. The PRINT statement displays output on the screen. The last statement of the program must be END.
  • 94. Sample True BASIC with input PROGRAM product2 INPUT m INPUT prompt "acceleration a (mks units) = ": a LET force = m*a ! force in Newton's PRINT "force (in Newtons) ="; force END
  • 95. Visual BASIC Visual basic is the worlds most widely use RAD language, (Rapid Application Development (RAD) is the process of rapidly creating an application. Visual Basic provide a powerful features such as graphical user interface, events handling assess to Win 32 API, object-oriented features, error handling, structured programming and much more. Not until Visual Basic appeared, developing Microsoft windows based application was a difficult and cumbersome process. Visual basic greatly simplifies window application development. The advantages of visual basic programming language
  • 96. Visual BASIC VB 1.0 was introduced in 1991. The drag and drop design for creating the user interface is derived from a prototype form generator developed by Alan Cooper and his company called Tripod. Microsoft contracted with Cooper and his associates to develop Tripod into a programmable form system for Windows 3.0, under the code name Ruby (no relation to the Ruby programming language).
  • 97. Visual BASIC Features Visual Basic gives a disciplined approach to writing programs that are clearer than unstructured programs, easier to test, debug and can be easily modify. It allows for the creation of powerful and professional looking application with less time and coding. It allows for strong typing i.e. has wide variety of input data types and support Rapid Application Development (RAD).
  • 98. Visual BASIC Features It has a complete edifying and debugging facilities and has the ability to generate a Dynamic Link Libraries (DLL`S), it allows for easier management of document and it is easy to learn. Visual Basic is a complete form of package for building user interface Visual basic is a fairly easy language to pick up. However, it is generally not used to make very large applications. VB was also created for MS Windows.
  • 99. Sample VB Program Private Sub Form_Load() ' Execute a simple message box that says "Hello, World!" MsgBox "Hello, World!" End Sub
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108. REMEMBER Please do not be mistaken by BASIC and Visual BASIC. BASIC (PROGRAMMING LANGUAGE) IS AN EARLIER VERSION OF VISUAL BASIC. Visual BASIC is MODIFIED for personal computer users, so we can say that it is a GUI VERSION of BASIC.
  • 109. Prepared by: Jeffrey James L. Valerio Shane Estavillo

Editor's Notes

  1. Type 4 2
  2. SAMPLE PROGRAM QUICK BASIC GALING SA LIBRO HERE.
  3. Sample Program HERERERERRRERERERER