Variables - A variable is a way to store and refer to changing pieces of data.Below are just some of the core concepts found in many different languages: Learning and mastering these concepts early will make it easier to solve problems and create powerful and efficient code. While the parts of this step that apply will vary depending on the language you choose, all programming languages have fundamental concepts that are essential to building useful programs.
#Basic computer programming terminology plus#
Plus sign (+), connected.Learn the core concepts of the language. The strings are separated by the concatenation operator. Many strings are called string operators. String operator (concatenation) T) The operator or twist used to combine the two. Example of operator AND A = 5 AND B = 12 OR A = 5 OR B = 12 NOT A = 5 NOT B = 12Ĥ. The logical operators used in QBASIC are shown below. Logical operators are specially used for making decisions. It gives a single value, that would be either True or False. Logical Operator refers to the operator that is used to combine two or more relational expressions. The relational operator used in QBASIC are given below: Operator Relation Example = Equal X = Y Not equal to X 50 Greater than X > 12 = Greater than or equal to X >= 14ģ. The relational operator is also known as comparison operator. These operators are used to show relation. Relational operator ( Comparison operator )Relational operator refers to the operator which are used to compare two values.
#Basic computer programming terminology mod#
The arithmetic operators used in QBASIC are as follows: Operator Meaning Example + Addition 3 + 2 = 5 Subtraction 4 – 2 = 2 * Multiplication 2 * 2 = 4 / Division 9 / 2 = 4.5 \ Integer division 9 \ 2 = 4 MOD Modulus division 5 MOD 2 = 1 ^ Exponentiation 3 ^ 2 = 9Ģ. Arithmetic operator: Arithmetic operator refers to the operator which is used to perform mathematical calculations such as addition, subtraction, multiplication, etc. Relational operator (Comparison operator)ġ. In QBASIC, four types of operators are used, which are as follows:Ģ. An operator symbolizes what kind of operation has to be performed on the data. Operator: A symbol that is used to perform an operation between two operands is called operator. The special characters have their own meaning and function,įor example: * means multiplication, and it is used to multiply two operands. The QBASIC character set contains alphabets (both uppercase and lowercase), numbers (09), and special characters.
Some of the examples of QBASIC keywords are INPUT, CLS, PRINT, etc the user should remember that keywords cannot be used as variable names.Ĭharacter set: Character set refers to the set of characters that are allowed to be used in QBASIC. In the same way, QBASIC also has its own keywords. Every programming language has its own keywords. Keywords: Keywords are the reserved words that instruct the computer to perform certain actions. Example: “Chitwan”, “0977Nepal”, “Sita rolls no 7”, “Chitwan, 4, Bharatpur”, etc These numbers cannot be used in mathematical calculations. These values cannot be changed during the program execution. String constant String constants are characters as well as numbers and are always enclosed in double quotation marks (“……………….”). These numbers can be used in mathematical calculations. These values cannot be changed while the program is running. Since QBASIC uses two types of data, there are two types of constants. Values that change during program execution remain the same. Constants: Constants are these data items. Some invalid numeric variable names in qbasic are:Ģ. X, y, role number, grade, salary, age, Num1, etc. Some valid numeric variable names in qbasic are: X, z, 3age $, name $, class 5 $, cls $, input $, and so on., Etc Some of the invalid string variables in qbasic names are: X $, y $, Name $, address $, sec1 $, and so on. Some of the Valid string variables in qbasic names are: QBASIC keywords or reserved words cannot be used as variable names such as cls, input, print. String variable names must end with a dollar sign ($).ĥ. There cannot be a space between the variable names.Ĥ. Variable names can be up to 40 characters in length.ģ. The remaining letters can be letters, numbers, or decimal points.Ģ. The first character of a variable name must begin with alphabets. Some rules while giving variable names are as follows:ġ.