SlideShare uma empresa Scribd logo
1 de 109
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

Mais conteúdo relacionado

Mais procurados

Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Programming languages
Programming languagesProgramming languages
Programming languagesAkash Varaiya
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentationashanrajpar
 
High level languages representation
High level languages representationHigh level languages representation
High level languages representationgaurav jain
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languageskitturashmikittu
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming LanguagesJuhi Bhoyar
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming LanguageReham AlBlehid
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...SHUBHAM PATIDAR FISHERIES ADDAA
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer ProgrammingAllen de Castro
 
Programming language
Programming languageProgramming language
Programming languageRajThakuri
 

Mais procurados (20)

DIGITAL COMPUTERS
DIGITAL COMPUTERSDIGITAL COMPUTERS
DIGITAL COMPUTERS
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Programming
ProgrammingProgramming
Programming
 
Computer Software & its Types
Computer Software & its Types Computer Software & its Types
Computer Software & its Types
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
COMPUTER PROGRAMMING
COMPUTER PROGRAMMINGCOMPUTER PROGRAMMING
COMPUTER PROGRAMMING
 
Operating system presentation
Operating system presentationOperating system presentation
Operating system presentation
 
High level languages representation
High level languages representationHigh level languages representation
High level languages representation
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languages
 
The Loops
The LoopsThe Loops
The Loops
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...
 
'Spreadsheet'
'Spreadsheet''Spreadsheet'
'Spreadsheet'
 
Java
JavaJava
Java
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Presentation on operating system
 Presentation on operating system Presentation on operating system
Presentation on operating system
 
Programming language
Programming languageProgramming language
Programming language
 

Semelhante a BASIC Programming Language

First compailer written
First compailer writtenFirst compailer written
First compailer writtenmicrowoorkers
 
Programming lesson1
Programming lesson1Programming lesson1
Programming lesson1camfollower
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programminghamza239523
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingGwyneth Calica
 
Introduction to compiler development
Introduction to compiler developmentIntroduction to compiler development
Introduction to compiler developmentDeepOad
 
History of Computer Programming Languages.pptx
History of Computer Programming Languages.pptxHistory of Computer Programming Languages.pptx
History of Computer Programming Languages.pptxAliAbbas906043
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2REHAN IJAZ
 
computerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxcomputerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxSubramanian 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
 

Semelhante a 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
 
Assignment on basic programming language
Assignment on  basic programming languageAssignment on  basic programming language
Assignment on basic programming language
 
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
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
 
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
 

Último

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Último (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

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

Notas do Editor

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