Results 1 to 2 of 2

Thread: Compare function pointers/references?

  1. #1
    Join Date
    Oct 2011
    Posts
    422
    Mentioned
    15 Post(s)
    Quoted
    116 Post(s)

    Default Compare function pointers/references to function?

    Is there a way to do something like this?
    Simba Code:
    function test() : Boolean;
    begin
    end;

    procedure a(Func: function: Boolean);
    begin
      if @func = test then
          blahblah

    //or
      if @func = @test then
          blahblah

    end;

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

    Default

    Var = reference. Equivalent to addr(X);
    @ = address operator.
    ^V = Pointer to variable of type V.
    V^ = Derefence variable V. Aka the Value V holds/points to.

    Totally different things. Pascal script does not have true pointer support and thus it is not possible as far as I know, to compare references.

    Lape:
    Simba Code:
    var
      P: ^Integer;
    begin
      P := @F;
      writeln(P);
      writeln(@F);
    end.
    Last edited by Brandon; 12-16-2012 at 06:55 AM.
    I am Ggzz..
    Hackintosher

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
  •