PDA

View Full Version : TAG as Procedure (parameter : ????????)


Alistair
29 Apr 06, 04:55 AM
Do any of you folks know how to do something like this that will work ..


SomeVar := GetLightingLevel("Zone(54)")
SomeVar := GetLightingLevel(54)

which are equivalent asuming the group 'Zone(54)' ahs a GA of 54

what I can't figure out is this ....

Procedure SomeProc (ZoneToUse : Integer);
begin
SomeVar := GetLightingLevel(ZoneToUse);
end;

SomeProc(54); {is fine}


but I can't find a way to use the TAG as the paramiter, the following is not correct ...


Procedure SomeProc (ZoneToUse : Integer);
begin
SomeVar := GetLightingLevel(ZoneToUse);
end;

SomeProc("Zone(54)"); {Will not work}

I have tried using strings but not suprisingly they did not work because the are none ordinal types.

Any ideas ?

Darren
01 May 06, 09:56 AM
What you are wanting to do is not currently possible. A tag is only relevant in context, otherwise the compiler has no idea what it is supposed to be.