Promotic
WikipediaLinkedInYoutubeTwitterFacebook

var - statement of language JavaScript

Description:
Declares variables.
Syntax:

var name [, ...];

var name [ = value [, ...]];

 
name Name of the variable
Note:
Variables declared with var in the procedure are available only within the procedure.
 
For similar purpose in the VBScript language is used the statement Dim and Set.
 
Using the new JavaScript commands of the Let and Const types is not recommended to use in the in the PROMOTIC system because the scripts must be functional also in the Web browser. These new command may malfunction in older web browsers.
Example:
Select and copy to clipboard

//Declare two variables
var nVar, nNum;

//Creation of two variables with assigned values
var nVar = 2;
var nNum = "text";

History:
Pm8.02.00: Created
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice