Dynamic variable
- From: "Simon" <spambucket@xxxxxxxxxxx>
- Date: Mon, 4 Jul 2005 17:39:03 +0100
Hi,
I was wondering if there was a way of doing something like...
/////////////////////////////////////////////
Dim g_ValA ' global values set somewhere
Dim g_ValB
Dim g_ValC
Dim g_ValD
Function GetValue( sItem )
GetValue = {sItem}.Value
End Function
....
Function SomeOtherFunction()
GetValue( "g_ValA" ) ' return the value of g_ValA
GetValue( "g_ValB" ) ' return the value of g_ValB
GetValue( "g_ValZ" ) ' return an error of some sort as g_ValZ
does not exist.
End Function
/////////////////////////////////////////////
where {sItem}is the name of a variable.
I think it can be acheived in PHP by doing something lke ${val}
Can it be done in VBScript?
Many thanks in advance.
Simon
.
- Follow-Ups:
- Re: Dynamic variable
- From: McKirahan
- Re: Dynamic variable
- Prev by Date: Re: HELP! Need AD Query for Last login
- Next by Date: Re: Dynamic variable
- Previous by thread: HELP! Need AD Query for Last login
- Next by thread: Re: Dynamic variable
- Index(es):
Relevant Pages
|