Difference between revisions of "FUNCTION EXISTS()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
(See Also)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to check whether a function has been declared
 
Function to check whether a function has been declared
 
  
 
==Syntax==
 
==Syntax==
 
FUNCTION_EXISTS(<expC>)
 
FUNCTION_EXISTS(<expC>)
 
  
 
==See Also==
 
==See Also==
[[ENDFUNC]], [[FUNCTION]], [[ISSET()]], [[PROCEDURE]], [[RETURN]], [[TYPE()]], [[UNSET()]], [[VARTYPE()]]
+
[[CLASS EXISTS()]], [[ENDFUNC]], [[FUNCTION]], [[IS_FUNCTION()]], [[ISSET()]], [[PEXIST()]], [[PROCEDURE]], [[RETURN]], [[SET LIBRARY]], [[SET PROCEDURE]], [[TYPE()]], [[UNSET()]], [[VARTYPE()]]
 
+
  
 
==Description==
 
==Description==
 
The FUNCTION_EXISTS() function can be used to check whether a function has been declared.  FUNCTION_EXISTS() will return .T. (true) if the function named <expC> has been declared and .F. (false) if it has not been declared.  Functions are declared using the [[FUNCTION]] or [[PROCEDURE]] commands.
 
The FUNCTION_EXISTS() function can be used to check whether a function has been declared.  FUNCTION_EXISTS() will return .T. (true) if the function named <expC> has been declared and .F. (false) if it has not been declared.  Functions are declared using the [[FUNCTION]] or [[PROCEDURE]] commands.
 
  
 
==Example==
 
==Example==
Line 25: Line 21:
 
endif
 
endif
 
</code>
 
</code>
 
==Products==
 
Recital, Recital Server
 
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Applications]]
+
[[Category:User Defined Functions]]
[[Category:Applications Functions]]
+
[[Category:Libraries]]
 +
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 10:31, 16 May 2022

Purpose

Function to check whether a function has been declared

Syntax

FUNCTION_EXISTS(<expC>)

See Also

CLASS EXISTS(), ENDFUNC, FUNCTION, IS_FUNCTION(), ISSET(), PEXIST(), PROCEDURE, RETURN, SET LIBRARY, SET PROCEDURE, TYPE(), UNSET(), VARTYPE()

Description

The FUNCTION_EXISTS() function can be used to check whether a function has been declared. FUNCTION_EXISTS() will return .T. (true) if the function named <expC> has been declared and .F. (false) if it has not been declared. Functions are declared using the FUNCTION or PROCEDURE commands.

Example

function add18
parameter dob
return gomonth(dob,18*12)
 
if function_exists('add18')
    attainmajority = add18(date())
endif