Page 1 of 1

What is this symbol @ ?

Posted: Fri Mar 26, 2004 9:04 pm
by TIGER
I so some times there is a @ symbol in from of procedure call or
variable.

What is it for ?

Posted: Fri Mar 26, 2004 9:17 pm
by AlGonzalez
See Pointers in the Help file.
Addresses of procedures

Normally only advanced programmers need to find the address of procedures. Probably the most common reason for needing the address of a procedure is when dealing with the OS at a low-level. Some OSes allow you to specify callback or hook functions (for some operations) which get called by the OS and allows the programmer to extend the ability of the OS routine. The address of a procedure is found in a similar way to variables.

    Example:

    Procedure WindowCB(WindowID.l, Message.l, wParam.l, lParam.l)
         ; This is where the processing of your callback procedure would be performed
    EndProcedure

    ; A special callback for the Windows OS allowing you to process window events
    SetWindowCallback( @WindowCB() )
HTH

Re: What is this symbol @ ?

Posted: Fri Mar 26, 2004 9:17 pm
by ricardo
TIGER wrote:I so some times there is a @ symbol in from of procedure call or
variable.

What is it for ?
Its the addres of the procedure or the variable.

Posted: Sat Mar 27, 2004 12:46 am
by freak