/* $DOC$ $TEMPLATE$ Function $NAME$ hb_PValue() $CATEGORY$ API $SUBCATEGORY$ Application $ONELINER$ Retrieves the value of an argument. $SYNTAX$ hb_PValue( ) --> xExp $ARGUMENTS$ A number that indicates the argument to check. $RETURNS$ Returns the value stored by an argument. $DESCRIPTION$ This function is useful to check the value stored in an argument. $EXAMPLES$ Test( 123, "abc" ) STATIC PROCEDURE Test( nValue, cString ) IF PCount() == 2 ? hb_PValue( 1 ), nValue ? hb_PValue( 2 ), cString ENDIF RETURN $STATUS$ R $COMPLIANCE$ H $FILES$ Library is core $SEEALSO$ PCount() $END$ */ /* $DOC$ $TEMPLATE$ Function $NAME$ PCount() $CATEGORY$ API $SUBCATEGORY$ Application $ONELINER$ Retrieves the number of arguments passed to a function. $SYNTAX$ PCount() --> nArgs $ARGUMENTS$ None $RETURNS$ A number that indicates the number of arguments passed to a function or procedure. $DESCRIPTION$ This function is useful to check if a function or procedure has received the required number of arguments. $EXAMPLES$ Test() Test( "abc" ) STATIC PROCEDURE Test( xExp ) IF PCount() == 0 ? "This function needs a parameter" ELSE ? xExp ENDIF RETURN $STATUS$ R $COMPLIANCE$ C $FILES$ Library is core $SEEALSO$ hb_PValue() $END$ */ /* $DOC$ $TEMPLATE$ Procedure $NAME$ __Quit() $CATEGORY$ API $SUBCATEGORY$ Events $ONELINER$ Terminates an application. $SYNTAX$ __Quit() $ARGUMENTS$ None $DESCRIPTION$ This function terminates the current application and returns to the system. $EXAMPLES$ EndApp( .F. ) EndApp( .T. ) STATIC PROCEDURE EndApp( lYesNo ) IF lYesNo __Quit() ENDIF RETURN $STATUS$ R $COMPLIANCE$ C $FILES$ Library is core $SEEALSO$ QUIT $END$ */ /* $DOC$ $AUTHOR$ Copyright 1999 Chen Kedem $TEMPLATE$ Function $NAME$ CLIPINIT() $CATEGORY$ API $SUBCATEGORY$ Internal $ONELINER$ Initialize various Harbour sub-systems $SYNTAX$ CLIPINIT() --> NIL $ARGUMENTS$ none. $RETURNS$ CLIPINIT() always return NIL. $DESCRIPTION$ CLIPINIT() is one of the pre-defined INIT PROCEDURE and is executed at program startup. It declare an empty MEMVAR PUBLIC array called GetList that is going to be used by the Get system. It activates the default error handler, and (at least for the moment) calls the function that sets the default help key. $STATUS$ R $COMPLIANCE$ It is said that CLIPINIT() should not call the function that sets the default help key since CA-Cl*pper does it in some other place. $PLATFORMS$ All $SEEALSO$ INIT PROCEDURE $END$ */ /* $DOC$ $AUTHOR$ Copyright 1999 Chen Kedem $TEMPLATE$ Procedure $NAME$ __SetHelpK() $CATEGORY$ API $SUBCATEGORY$ Internal $ONELINER$ Set as the default help key $SYNTAX$ __SetHelpK() $ARGUMENTS$ None. $DESCRIPTION$ Set to execute a function called HELP if such a function is linked into the program. $STATUS$ R $COMPLIANCE$ C $FILES$ Library is core $SEEALSO$ __XHelp(), SET KEY, SetKey() $END$ */ /* $DOC$ $TEMPLATE$ Procedure $NAME$ Break() $CATEGORY$ API $SUBCATEGORY$ Error $ONELINER$ Exits from a `BEGIN SEQUENCE` block $SYNTAX$ Break( ) $ARGUMENTS$ is any valid expression. It is always required. If do not want to pass any argument, just use NIL. $DESCRIPTION$ This function passes control to the RECOVER statement in a `BEGIN SEQUENCE` block. $EXAMPLES$ Break( NIL ) $STATUS$ R $COMPLIANCE$ C $FILES$ Library is core $SEEALSO$ BEGIN SEQUENCE $END$ */ /* $DOC$ $AUTHOR$ Copyright 1999 Ryszard Glab $TEMPLATE$ Function $NAME$ Do() $CATEGORY$ API $SUBCATEGORY$ Application $ONELINER$ Calls a procedure or a function $SYNTAX$ Do( [, ] ) --> xRetVal $ARGUMENTS$ = Either a string with a function/procedure name to be called or a codeblock to evaluate. = 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 HB_IT_SYMBOL type that stores the name of procedure specified in `DO 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 WITH ` In this case is of type HB_SYMB. $EXAMPLES$ LOCAL cFunction := "MyFunc" ? Do( cFunction, 1 ) // Old style DO &cFunction WITH 2 // Old style with macro ? Do( {| n | MyFunc( n ) }, 3 ) ? Do( @MyFunc(), 4 ) FUNCTION MyFunc( n ) /* must be a public function for old style calls */ ? n RETURN n + 1 $COMPLIANCE$ C $FILES$ Library is core $END$ */