Difference between revisions of "PARAMETERS()"

From Lianjapedia
Jump to: navigation, search
m (Text replace - "Recital" to "Lianja")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return number of parameters passed
 
Function to return number of parameters passed
 
  
 
==Syntax==
 
==Syntax==
 
PARAMETERS()
 
PARAMETERS()
 
  
 
==See Also==
 
==See Also==
[[FUNCTION]], [[PCOUNT()]], [[PROCEDURE]], [[RETURN]], [[SET PROCEDURE]]
+
[[FUNCTION]], [[GETPARAMETER()]], [[PARAMETERS]], [[PCOUNT()]], [[PROCEDURE]], [[RETURN]], [[SET PROCEDURE]]
 
+
  
 
==Description==
 
==Description==
 
The PARAMETERS() function is synonymous with the PCOUNT() function.  The PARAMETERS() function returns the number of parameters passed to a procedure or function.  These functions are useful for checking that the correct number of parameters has been passed to a procedure or function.
 
The PARAMETERS() function is synonymous with the PCOUNT() function.  The PARAMETERS() function returns the number of parameters passed to a procedure or function.  These functions are useful for checking that the correct number of parameters has been passed to a procedure or function.
 
  
 
==Example==
 
==Example==
Line 29: Line 25:
 
return .T.
 
return .T.
 
</code>
 
</code>
 
  
 
==Products==
 
==Products==

Latest revision as of 10:17, 19 May 2014

Purpose

Function to return number of parameters passed

Syntax

PARAMETERS()

See Also

FUNCTION, GETPARAMETER(), PARAMETERS, PCOUNT(), PROCEDURE, RETURN, SET PROCEDURE

Description

The PARAMETERS() function is synonymous with the PCOUNT() function. The PARAMETERS() function returns the number of parameters passed to a procedure or function. These functions are useful for checking that the correct number of parameters has been passed to a procedure or function.

Example

function print
parameter m_file,m_filter,m_options
if parameters() <>3
    set message to "3 parameters must be passed."
    return .F.
else
    set filter to &m_filter
    report form &m_file &m_options to print
    set filter to
endif
return .T.

Products

Lianja, Lianja Server