0 like 0 dislike
39 views
in Computer Science by (1.0m points)
What is meant by variable? Discuss different rules for naming variables in GW-BASIC.

1 Answer

0 like 0 dislike
by (1.0m points)
Variables: Variables are the names that you have chosen to represent values used in a GW-BASIC program. The value of a variable may be assigned specifically, or may be the result of calculations in your program. If a variable is assigned no value, GW-BASIC assumes the variable's value to be zero. GW-BASIC variable names may be any length; up to 40 characters are significant. The characters allowed in a variable name are letters, numbers, and the decimal point. The first character in the variable name must be a letter. Special type declaration characters are also allowed. Reserved words (all the words used as GW-BASIC commands, statements, functions, and operators) can't be used as variable names. However, if the reserved word is embedded within the variable name, it will be allowed. Variables may represent either numeric values or strings.

Rules for Naming a Variable in GW-Basic

1. A Variable name cannot be more than 40 characters.

 2. The name of Variable may contain alphabets (both lower case and upper case) numbers and decimal points. 3. The first character in name of Variable must be an Alphabet.

 4. Key /Reserved words of BASIC cannot be used as Variables.

 5. Blank space is not allowed in names of Variables.

6. Last character of variable name should indicate the type of variable.

Related questions

0 like 0 dislike
1 answer 27 views
0 like 0 dislike
0 answers 35 views
0 like 0 dislike
0 answers 45 views
0 like 0 dislike
1 answer 30 views
0 like 0 dislike
1 answer 34 views
0 like 0 dislike
1 answer 33 views
0 like 0 dislike
1 answer 46 views
asked Nov 9, 2018 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 41 views
asked Nov 9, 2018 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 27 views
0 like 0 dislike
1 answer 28 views
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

3.3k users

Free Hit Counters
...