answersLogoWhite

0

What is naming variable?

Updated: 10/27/2022
User Avatar

Wiki User

11y ago

Best Answer

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

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is naming variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


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 are the advantages of case sensitive languages?

A case sensitive language gives you more flexibility in naming variables. It also lets you use the same variable name more than once for different purposes by changing different letters to upper or lower case, each version being treated as a separate variable. In practice, this is not recommended as it can cause confusion in reading programs and keeping track of which variable has what purpose.


What is accumulator in digital logic?

It is a variable or a component of a variable.

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 are the 2 methods of naming ionic compound having metal with variable oxidation number?

classical method and stock method


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?

name the metal first followed by the non metal retaining the rootword and suffixes "ions" #mariele duldulao


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!


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 a sentence for naming?

The process of naming our new product took longer than expected due to conflicting ideas among team members.


What are the advantages of case sensitive languages?

A case sensitive language gives you more flexibility in naming variables. It also lets you use the same variable name more than once for different purposes by changing different letters to upper or lower case, each version being treated as a separate variable. In practice, this is not recommended as it can cause confusion in reading programs and keeping track of which variable has what purpose.


What is chlorines reason for naming?

Reason for naming chlorine