18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

Differences between <strong>VBScript</strong> and VBA<br />

Since other HMI/SCADA products support VBA, it might be worth highlighting some of the key<br />

differences between <strong>VBScript</strong> and VBA. For HMI/SCADA applications, these differences are relatively<br />

minor. However, <strong>VBScript</strong> support <strong>for</strong> the Windows CE operating system is a major differentiator<br />

between the two products. For additional details or a complete listing of the differences, please<br />

reference the MSDN website at http://msdn.microsoft.com.<br />

Key differences between <strong>VBScript</strong> vs. VBA<br />

Item VBA <strong>VBScript</strong><br />

Primary Purpose Automation of MS Office Applications Automation of <strong>Web</strong> Services<br />

Support <strong>for</strong> Windows CE No Yes<br />

Data Types Stronger Type Declaration. Many<br />

data types supported. (e.g. String,<br />

Integer, Date, Boolean)<br />

Typeless, uses Variant Type. The final<br />

data subtype will be determined at<br />

runtime based on use. Supports same<br />

data subtypes as VBA and VB (e.g.<br />

String, Integer, Date, Boolean, etc)<br />

Dimension Statement Dim Var as Type Dim Var<br />

(Cannot specify Type, but it is<br />

determined at runtime based on use)<br />

Class Block declaration Must use separate Class Module Class Block Declaration supported<br />

Object Clipboard<br />

Collection<br />

Not supported<br />

Object Manipulation TypeOf Not supported<br />

Eval function Not supported Expression evaluation supported<br />

Execute function Not supported Allows interpreted code to be executed<br />

on the fly.<br />

RegExp No Allows creation of regular expressions<br />

Error Handling Several different types Supported but more limited<br />

Arrays Lower bound can be 0 Lower bound is 0<br />

File I/O Supported Not directly supported but <strong>VBScript</strong> can<br />

use FileSystemObject and can access<br />

IWS built-in I/O functions<br />

DDE Supported Not supported<br />

Financial functions Supported Not supported<br />

Strings Fixed length strings Variable length only<br />

Debugging Debug, Print, End, Stop Use MsgBox or IWS built-in functions<br />

Line labels Supported Not supported<br />

<strong>InduSoft</strong>, Ltd. 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!