VBScript Reference Manual for InduSoft Web Studio
VBScript Reference Manual for InduSoft Web Studio
VBScript Reference Manual for InduSoft Web Studio
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />
SetLocale<br />
Description Sets the current locale ID value<br />
Usage SetLocale(lcid)<br />
Arguments lcid<br />
The lcid cab be any valid 32-bit value or short string that uniquely identifies a geographical<br />
locale. Recognized values can be found in the Locale ID chart. If lcid is zero, the locale is set<br />
to match the current system setting.<br />
Remarks A locale is a set of user preference in<strong>for</strong>mation related to the user's language, country/region, and<br />
cultural conventions. The locale determines such things as keyboard layout, alphabetic sort order,<br />
as well as date, time, number, and currency <strong>for</strong>mats. This function can be used in conjunction<br />
with the IWS run-time translation tool to automatically switch the language displayed<br />
See Also GetLocale<br />
Example SetLocale (”en=gb”)<br />
Sgn<br />
Description Returns the integer indicating the sign of a number<br />
Usage intVal = Sgn(number)<br />
Arguments number<br />
The number argument can be any valid numeric expression.<br />
Return An Integer.<br />
Remarks The sign of the number argument determines the return value of the Sgn function.<br />
If number is Sgn returns<br />
Greater than zero 1<br />
Equal to zero 0<br />
Less than zero -1<br />
See also Abs<br />
Example Dim MyVar1, MyVar2, MyVar3, MySign<br />
MyVar1 = 12<br />
MyVar2 = -2.4<br />
MyVar3 = 0<br />
MySign = Sgn(MyVar1) ' Returns 1.<br />
MySign = Sgn(MyVar2) ' Returns -1.<br />
MySign = Sgn(MyVar3) ' Returns 0.<br />
Sin<br />
Function Returns the sine of an angle.<br />
Usage dblVal = Sin(number)<br />
Arguments number<br />
The number argument can be any valid numeric expression that expresses an angle in radian<br />
s.<br />
Return Returns a Variant subtype Double specifying the sine of an angle in radians<br />
Remarks The Sin function takes an angle and returns the ratio of two sides of a right triangle. The ratio is<br />
the length of the side opposite the angle divided by the length of the hypotenuse. The result lies<br />
in the range -1 to 1. To convert degrees to radians, multiply degrees by pi /180. To convert<br />
radians to degrees, multiply radians by 180/pi. Pi = 3.14159<br />
See Also Atn, Cos, Tan<br />
Example Dim MyAngle, MyCosecant<br />
MyAngle = 1.3 ' Define angle in radians.<br />
MyCosecant = 1 / Sin(MyAngle) ' Calculate cosecant.<br />
158 <strong>InduSoft</strong>, Ltd.