VBScript - The keywords

December 2016

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.

Related :

This document entitled « VBScript - The keywords » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.