Knowledge Share

Knowledge is NOT Power IMPLEMENTATION of knowledge is Power!!!
 
HomePortalGalleryCalendarFAQRegisterUsergroupsLog in

Share | 
 

 VBScript for Returning more than one value from a function

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


Posts : 141
Points : 407
Reputation : 0
Join date : 2007-12-29
Location : Chennai

PostSubject: VBScript for Returning more than one value from a function   Mon Feb 21, 2011 2:18 pm

VBScript for Returning more than one value from a function
‘More than one value can returned from a function using Array Variable
‘Following function returns more than one value from a function i.e fnFunctionToReturnMoreThanOneValue
Function fnFunctionToReturnMoreThanOneValue()
x=”www.ramupalanki.com”
y=”QTP”
fnFunctionToReturnMoreThanOneValue=Array(x,y)
End Function

x=fnFunctionToReturnMoreThanOneValue()
‘Calling and assigning the array values to the variable
‘displaying both the returned original x and y values
MsgBox x(0)
MsgBox x(1)
Notepad: Copy the above code into the Notepad, save it as ScriptToReturnMoreThanOneValue.vbs and double click the file
Back to top Go down
http://knowledgeshare.forumotion.com
 
VBScript for Returning more than one value from a function
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» SSB4
» Sudden Return of Migraines
» getXpathCount returning 0
» Soft Assert and returning whether it passes or not
» [Discussion] Slimming down boot.wim

Permissions in this forum:You cannot reply to topics in this forum
Knowledge Share :: Testing :: Automation-
Jump to: