version 11
{FN sql_name ([arithmetic_expression, ..., arithmetic_expression]) AS sql_data_type_name}
Description
A 4d_function_call can be used to execute a 4D function that returns a value.
The sql_name of the function is preceded by the FN keyword and followed by one or more arithmetic_expression type arguments. The value returned by the function will be of the type defined by the sql_data_type_name passed.
Example
Here is an example using functions to extract from the MOVIES table the number of actors for each movie having at least 7 actors:
   C_LONGINT($NrOfActors)
   ARRAY TEXT(aMovieTitles;0)
   ARRAY LONGINT(aNrActors;0)
   $NrOfActors:=7
   Begin SQL  
      SELECT Movie_Title, {FN Find_Nr_Of_Actors(ID) AS NUMERIC}
      FROM MOVIES  
      WHERE {FN Find_Nr_Of_Actors(ID) AS NUMERIC} >= :$NrOfActors  
      ORDER BY 1  
      INTO :aMovieTitles; :aNrActors
   End SQL
See Also
arithmetic_expression, sql_data_type_name, sql_name.