TAG as Procedure (parameter : ????????)

Discussion in 'General Discussion' started by Alistair, Apr 28, 2006.

  1. Alistair

    Alistair

    Joined:
    Jan 25, 2006
    Messages:
    16
    Likes Received:
    0
    Location:
    Darwen UK
    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 ?
     
    Alistair, Apr 28, 2006
    #1
  2. Alistair

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    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.
     
    Darren, May 1, 2006
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.