PickBASIC / FlashBASIC

BASIC operators

.md

The following BASIC operators are available.

In this section

! logical operatorThe ! logical operator indicates an or operation in a logical expression.# relational operatorThe # relational operator signifies not equal to.& logical operatorThe and boolean operator indicates that both components of a logical expression must be true.* arithmetic operatorThe * (asterisk) arithmetic operator is a mathematical operator indicating a multiply operation.*= assignment operatorThe *= assignment operator multiplies a numeric expression and assigns it to the variable.+ arithmetic operatorThe + arithmetic operator performs addition or indicates a positive numeric value.+= assignment operatorThe += assignment operator adds a given numeric expression and assigns it to the given variable.- arithmetic operatorThe - arithmetic operator designates a subtraction operation, or to indicate a negative numeric value.\ arithmetic operatorThe \ operator (also called the remainder operator) calculates the remainder of dividing the dividend by the divisor (otherwise known as the modulo).\= assignment operatorThe \= assignment operator divides a variable by a given numeric expression and assigns the remainder (modulo) to the variable.^ arithmetic operatorThe ^ symbol arithmetic operator is an alternate means of indicating an exponentiation operation on a specific numeric expression.-= assignment operatorThe -= assignment operator decrements a variable by a numeric expression./ arithmetic operatorThe / arithmetic operator performs division./= assignment operatorThe /= assignment operator divides a variable by a numeric expression and assigns it to the given variable.: relational operatorThe : (colon) relational operator concatenates strings in an assignment statement or, when the : displays at the end of a print or crt expression, suppresses the automatic CR/LF combination, thus holding the current print/display position. It is also used as a token within the input @ statement.:= assignment operatorThe := assignment operator concatenates a string to a variable and assigns it back to the given variable.<= relational operatorThe <= relational operator is the less than or equal to operator.<> relational operatorThe <> relational operator represents a not equal to operator.= assignment operatorThe = assignment operator represents either the assignment operator in an assignment statement or a relational operator in a conditional expression.> relational operatorThe >relational operator is the greater than operator.>< relational operatorThe >< relational operator is the not equal operator.>= relational operatorThe >= relational operator is the greater than or equal to operator.and logical operatorThe and logical operator indicates that both components of a logical expression must be true.cat relational operatorThe cat relational operator concatenates strings in an expression.eq assignment operatorThe eq assignment operator represents either the assignment operator in an assignment statement or a relational operator in a conditional expression.ge relational operatorThe ge relational operator denotes a greater than or equal condition between two elements.gt relational operatorThe gt relational operator denotes a greater than condition between two elements.le relational operatorThe le relational operator represents the less than or equal to (<=) condition.lt relational operatorThe lt relational operator is used in conditional expressions as an alternate form of the less than (<) condition.match relational operatorThe match relational operator tests a string and determines if it matches a predefined pattern of alphabetical, numeric, wildcard, or literal characters.ne relational operatorThe ne relational operator represents a not equal to condition within relational expressions.or logical operatorThe or logical operator indicates that only one of the components of a logical expression need be true for the expression to evaluate as true.