Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Harbour Version 0.37 (c) reference Guid - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

DO()

Calls a procedure or a function
---------------------------------------------------------------------------------

 Syntax

        DO( <xFuncProc> [, <xArguments...>] )  

 Arguments

        <xFuncProc>   = Either a string with a function/procedure name 
                  to be called or a codeblock to evaluate.
        <xArguments>   = arguments passed to a called 
                  function/procedure or to a codeblock.

 Returns

       A  value that was returned from called function.    

 Description

      This function can be called either by the harbour compiler or by
      user.  The compiler always passes the item of IT_SYMBOL type that
      stores the  name of procedure specified in DO <proc> WITH ...
      statement.
      If called procedure/function doesn't exist then a runtime error  is
      generated.
      This function can be used as replacement of macro operator.  It is
      also used internally to implement DO <proc> WITH <args...>  In this
      case <xFuncProc> is of type HB_SYMB.

 Examples

      cbCode ={|x| MyFunc( x )}
      DO( cbCode, 1 )

      cFunction := "MyFunc"
      xRetVal :=DO( cFunction, 2 )

      Old style (slower):
      DO &cFunction WITH 3
  

 Files

      Library is rtl
      Library is rtl

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson