Saturday, 18 May 2013

#6. Function can return an array and an object too.

Function returning an array:-
Function arr()
   a = Array(3,1,5)
   arr = a
End Function
b = arr()
msgbox b(1)
'prints 1.

Function returning an object:-
Function getPage()
   Set getPage = Browser("creationTime:="&getBrowserIndex()).Page("title:=.*")
End Function
'getBrowserIndex is function that returns current index of browser.

No comments:

Post a Comment