07 November 2017

Find if any number is Positive, Negative or 0 using VB Script inbuilt Function 'Sgn'

Dim MyVar1, MyVar2, MyVar3, MySign

MyVar1 = 250 : MyVar2 = -351.44 : MyVar3 = 0

MsgboxSgn(MyVar1)   ' Returns 1.

MsgboxSgn(MyVar2)   ' Returns -1.

MsgboxSgn(MyVar3)   ' Returns 0.


...

No comments:

Post a Comment

AOM - Automation Object Model

'Creating QuicTest Object Set  qtapp =  createobject ( "QuickTest.Application" ) 'Launching the Application If  qtapp...