Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Is there a way to get all the variables values in a scope into array, without hard coding each value the array. its does not have to be a array ? my goal is to dump all variables values in text file.



Thanks

Edit

Public Function TestFunction()
    Dim varone,vartwo
    varone  = "1"
    vartwo  = "2"
End Function

Public Function dump()
    for each (var item in TestFunction())
        console.write(item.name + ":" +item.var)
End Function


--------------------------------------------------------------
if i call the dump function the dump()
Console Output should be :
varone:1<br />
vartwo:2


This code is just a exapmle and what im thinking and is not working code.
Posted
Updated 5-Aug-15 23:19pm
v2
Comments
Maciej Los 6-Aug-15 3:28am    
Please, be more specific and provide more details...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900