100% found this document useful (1 vote)
3K views

Operators in QBASIC

Operators in QBASIC perform mathematical, logical, relational, and string operations on values and variables. There are arithmetic operators for calculations, relational operators for comparisons that return TRUE or FALSE, and logical operators that connect relational expressions. String operators allow concatenation and appending of strings.

Uploaded by

Baklund Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views

Operators in QBASIC

Operators in QBASIC perform mathematical, logical, relational, and string operations on values and variables. There are arithmetic operators for calculations, relational operators for comparisons that return TRUE or FALSE, and logical operators that connect relational expressions. String operators allow concatenation and appending of strings.

Uploaded by

Baklund Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Operators in QBASIC

Group members-Subhiksha Niraula,Spandan Kafle,


Abnish Chaudhary
Operator
• An operator is a symbol representing the
operations they perform or operands in program.
• The values on which the operators work are
referred to as operands.
• Operators perform mathematical or logical
operations on values.
• BASIC supports the following types of
operators:
Arithmetic operator
Logical operator
Relational operator
Arithmetic operators
• Arithmetic operators perform arithmetic
operations on the numeric values or on the
variables holding numeric values.

Example:
Multiplication(*), Addition(+),
Subtraction(-), Integer Division(\),
Modulus Division(MOD), etc.
Relational operators
• Relational operators are used to evaluate
and compare two values of the same type,
either both numeric or both string.
• The result of comparison is either TRUE or
FALSE.

Example:
Equal(=), Less than(<), Greater
than(>), Less than or equal to(<=), Greater
than or equal to(>=), Not equal to(< >).
Logical operators
• Logical operators are used to connect two or
more relational expressions to evaluate a single
value as TRUE or FALSE.

• The logical operators supported by QBASIC are:


AND
OR
NOT
AND
• When two logical expressions are
combined using the AND logical
operator ,the entire logical operation
will be true only if both the logical
expressions are individually true.
OR
• The entire logical operation in this case
will be true if either of the logical
expressions is true.
NOT
• NOT is a negative check operator.
• It operates with one operand.
• For the entire logic operation of not to be
true, the logic expression should satisfy the
stated conditions negatively.
String operator
• String operators represent the various types of operations that we
can employ on the string type of the variables in the program.
• There are two string operators:
• The first is the concatenation operator ('. '), which returns the
concatenation of its right and left arguments.
• The second is the concatenation assignment
operator (' . = '), which appends the argument on
the right side to the argument on the left side.

You might also like