FANDOM


Variables are mainly used to store a piece of information. This could include numbers, letters, expressions, or characters.


SyntaxEdit

To use a variable, you simply come up with a name that isn't a function or command, and then set it to something. In the following example, the variable name is "VName"

VName = "This is the text that VName will contain."
Assigning it to a number:
 VName = 10
Assigning it to an expression:
VName = 10 + 5

NamingEdit

Variables are the cornerstones that programs revolve around. You can have an unlimited amount of variables - but be careful when naming not to have a space anywhere in the name, or Windows Scripting Host (The VBS Manager) will treat it as two seperate variables.

Calling a VariableEdit

This is very simple. To call the value of a variable, simply use the variable name. Here's an example:

MsgBox VName

Another example using the If Statement, comparing it to a number...assuming that the value of VName is only a number, not text:

 If VName > 50 Then MsgBox "You've exceeded the limit!"



Remember, if you ever need help, you can ask BusyCityGuy on his talk page.


Did you find what you needed?
 
36
 
17
 
18
 

The poll was created at 23:16 on June 10, 2012, and so far 71 people voted.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.