answersLogoWhite

0

A variable is a storage location, effectively.

It stores information, only whilst your program is running.

For instance,

Dim Num As Integer = 0

Dim, declares our variable - this is short for Dimension, as it sets aside memory space (random access memory).

Num is the name of our Variable, we can refer back to this at later dates. For instance:

Dim Num As Integer = 0 'This is our variable

Bla bla bla

Num = 9

This creates our variable 'Num' and sets it as a Integer. It then assigns the Variable a value (0)

Then, it does some code (bla bla bla - Note, this code won't work, it's just used as an example!)

Then, we edit the value of our Variable by simply typing "Num = 9"

As Integer = This declares the data type, this means we want a Integer (Number) as a data type.

Some examples of different data types are:

Boolean

Byte

Char

DateTime

Decimal

Double

Int16

Int32

Int64

SByte

Single

UInt16

UInt32

UInt64

And then that's it! I hope I explained it easily enough for you to understand and remember, no matter how hard you think it is keep trying and you'll get it in no time!

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Specify the naming convention for variable constant class and method?

The naming convention for variables, constants, classes, and methods involves delimiting separate words with a non-alphanumeric character such as a hyphen or underscore.


Rules in naming variables in programming?

there are various types of naming rule provide for function ,identifier,i.e variables.but naming rule for variable must meet certain condition.. 1.you can easily idenfy what is variable for.for eg.you may use int a;/to store no of student in your prog. but it is better instead of using "a",you can write any of the following definition int stu; or int stu_no; or int studentno; 2.it must be abbreviated.because although modern compiler support 32 char variable but still where you use that variable you have to type that name again &again. so for eg. in the above case int stu_no; is optimal. when these precondition are met then here are some rules for naming a variable: 1.you use only English alphabet,numeric no,& _(underscore). 2.you must start with a alphabet. then you continue with alphabet or numeric or under score.for eg. you can define a variable like int stu_comp_2009;//for no of student 2009 batch. 3.no variable can start with number or _.such naming may cause some compiler do the right job but maximum would not support this.


What are variable start the us for naming variyable?

In the U.S., variable names in programming typically follow specific conventions: they must start with a letter (A-Z or a-z) or an underscore (_), and they cannot begin with a digit. After the first character, variables can include letters, digits (0-9), and underscores. Additionally, variable names are case-sensitive, meaning "Variable" and "variable" would be considered different identifiers. It's also a best practice to use descriptive names that convey the purpose of the variable.


Can variable names can have spaces between them?

No. int my variable; <- not a valid declaration Java naming conventions say that you should use capital letters to differentiate words in a variable name. int myVariable; <- valid! Note that you can use the _ (underscore) character, as well, though some people suggest avoiding this. int my_variable; <- also valid!


What is another name for a javascript variable?

Another name for a JavaScript variable is an "identifier." Identifiers are names given to variables that allow developers to reference and manipulate data stored in those variables throughout their code. They must follow specific naming conventions and rules defined by the JavaScript language.

Related Questions

What are the rule used in naming a variable Give examples?

variable is a character or number sequence of a character is called array name


Specify the naming convention for variable constant class and method?

The naming convention for variables, constants, classes, and methods involves delimiting separate words with a non-alphanumeric character such as a hyphen or underscore.


Rules in naming variables in programming?

there are various types of naming rule provide for function ,identifier,i.e variables.but naming rule for variable must meet certain condition.. 1.you can easily idenfy what is variable for.for eg.you may use int a;/to store no of student in your prog. but it is better instead of using "a",you can write any of the following definition int stu; or int stu_no; or int studentno; 2.it must be abbreviated.because although modern compiler support 32 char variable but still where you use that variable you have to type that name again &again. so for eg. in the above case int stu_no; is optimal. when these precondition are met then here are some rules for naming a variable: 1.you use only English alphabet,numeric no,& _(underscore). 2.you must start with a alphabet. then you continue with alphabet or numeric or under score.for eg. you can define a variable like int stu_comp_2009;//for no of student 2009 batch. 3.no variable can start with number or _.such naming may cause some compiler do the right job but maximum would not support this.


What is the prefix for variable?

In programming, the term "prefix" typically refers to a naming convention that precedes the name of a variable. Common prefixes include "int" for integer variables, "str" for string variables, "bool" for boolean variables, and so on. These prefixes help developers quickly identify the data type of a variable.


What is an union in C language?

A "union declaration" specifies a set of variable values and, optionally, a tag naming the union. The variable values are called "members" of the union and can have different types. Unions are similar to "variant records" in other languages.


What are rules used in naming php variable?

Well, firstly, all PHP variable names begin with the dollar sign. After that...PHP variable names must begin with either a letter or an underscore ( _ )PHP variable names can only contain letters, numbers, and underscores.A variable cannot contain spaces. Therefore variable names using more than one word should be separated using an underscore or camel cased. e.g. $multiple_word_variable_name OR $multipleWordVariableName.


What is the rule when naming ionic compounds with variable oxidation numbers?

When naming ionic compounds with variable oxidation numbers, the cation's charge is specified using Roman numerals in parentheses after the metal's name. For example, iron(II) chloride and iron(III) chloride for FeCl2 and FeCl3, respectively.


What are variable start the us for naming variyable?

In the U.S., variable names in programming typically follow specific conventions: they must start with a letter (A-Z or a-z) or an underscore (_), and they cannot begin with a digit. After the first character, variables can include letters, digits (0-9), and underscores. Additionally, variable names are case-sensitive, meaning "Variable" and "variable" would be considered different identifiers. It's also a best practice to use descriptive names that convey the purpose of the variable.


When using the camelCase naming convention the first word of the variable name is written in lowercase letters and the first character of the second and subsequent words are written in uppercase lette?

CamelCase is a naming convention where the first word of a variable name starts with a lowercase letter, while each subsequent word begins with an uppercase letter. For example, a variable name in camelCase might look like myVariableName. This style enhances readability by visually distinguishing the start of new words within the variable name without using spaces or underscores. It is commonly used in programming languages such as JavaScript and Java.


Can variable names can have spaces between them?

No. int my variable; <- not a valid declaration Java naming conventions say that you should use capital letters to differentiate words in a variable name. int myVariable; <- valid! Note that you can use the _ (underscore) character, as well, though some people suggest avoiding this. int my_variable; <- also valid!


Can variable have names space between them?

No. int my variable; <- not a valid declaration Java naming conventions say that you should use capital letters to differentiate words in a variable name. int myVariable; <- valid! Note that you can use the _ (underscore) character, as well, though some people suggest avoiding this. int my_variable; <- also valid!


What are the 2 methods of naming ionic compound having metal with variable oxidation number?

The two methods of naming ionic compounds with a metal that exhibits variable oxidation states are using the Stock system (Roman numerals in parentheses) and the Common system (using suffixes -ous and -ic). The Stock system is more commonly used and provides a specific indication of the metal's oxidation state in the compound.