Results 1 to 3 of 3

Thread: Finding the current procedure/function ?

  1. #1
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default Finding the current procedure/function ?

    The current script I'm making requires huge amounts of failsafes and so I was wondering whether it is possible to find out which procedure and function is currently being processed and thus making something like :

    Simba Code:
    procedure FailSafes(Failsafe);

    Failsafe being determined by the current procedure.

    For example : during login, Failsafe(var) would correspond to a certain Failsafe designed for this exact moment.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Yes..

    1. Create a Global Variable that possibly takes a string or an Enum.
    2. In each function, initialize that Enum/string to the corresponding value.
    3. In your Failsafes function, Switch case that string/enum and see which function was called.. Or do an if-else.

    I don't know of anyway to compare pointers/addresses in Pascalscript..
    Last edited by Brandon; 01-05-2013 at 10:32 PM.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Yes..

    1. Create a Global Variable that possibly takes a string or an Enum.
    2. In each function, initialize that Enum/string to the corresponding value.
    3. In your Failsafes function, Switch case that string/enum and see which function was called.. Or do an if-else.

    I don't know of anyway to compare pointers in Pascalscript..
    I must be tired, it's so simple.. Thank you Brandon.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •