routine_id evaluation

new topic     » topic index » view thread      » older message » newer message

Robert,
I don't suppose you'd consider allowing routine_id to be evaluated at
run-time rather than at "compile" time?

eg.
in foo.e I have ...

   sequence handles handles = {}
   global function setHandle(atom handletype, sequence procname)
        integer p
        if handletype >1 and handletype < 10 then
            p = routine_id(procname)
            handles &= {handletype, procname, p}
            return p
        else
            return -1
        end if
   end function

and in bar.e I have ...

    include foo.e
    X = setHandle(1, "routineX")
    Y = setHandle(2, "routineY")

    procedure routineX()
    end procedure

    procedure routineY()
    end procedure

etc....

------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu