VBScript - The keywords

February 2017

The keywords

VBScript has five keywords corresponding to specific values ??for the variables.

The Empty the keyword

The Empty the keyword corresponds to the uninitialized state of a variable, that is to say that the variable exists but does not yet have a value.
dim MyVariable   'uninitialized variable 
MyVariable="toto"   'variable initialized with the string "toto" 
x=empty   'uninitialized variable

The Null keyword

The Null keyword, is not to be confused with Empty keyword. It corresponds to a value of an invalid variable.

The Nothing keyword

The Nothing keyword, when assigned to a variable (or more generally an object) can destroy it, and then release the resources used.

set MyVariable=Nothing  

The keywords True and False

The keywords True and False are boolean values??, that is to say, they are used in conditional operations whether a condition can either be true or false. True corresponds to the value 1. False corresponds to the value -1.

Original document published CommentcaMarche.net.


Published by jak58. Latest update on March 11, 2013 at 01:12 PM by jak58.
This document, titled "VBScript - The keywords," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).