Skip to end of metadata
Go to start of metadata

This part of the documentation introduces the AdvPL language functions.

 

AdvPL has several pre-programmed functions that are extremely useful and important to the development of sophisticated applications. The functions are the AdvPL greatest power and it is considered be more important than the commands.

 

All functions of AdvPL standard library have the following shape:

 

FUNCTION(<lista de argumentos>)

 

FUNCTION defines the name that identifies the function and arguments list; between parentheses, the arguments separated by commas.

 

The functions arguments are values the function runs some operation and provides a result. The arguments can be constituted by characters, variables, numbers, logical values, dates, valid expressions of any kind, arrays, arrays elements, code blocks, objects, etc.

 

Some functions have only an argument, others have several and there are some functions that do not have arguments, they just provide values or run determined instructions.

 

As the commands, the functions are displayed through the following topics:

 

 

Topic

Content

Function

Identifies the function name.

Syntax

It defines the syntax to its use.

Purpose

It defines its main purpose.

Arguments

It specifies the argument list the function used.

Use

It describes how the function must be used.

Tips

It provides useful information to the functions use.

Example

It displays some practical examples of the function application.

See Also

It lists other functions and commands related to the displayed function that also must be queried.

 

 

Notation and syntax convention

 

A standard and traditional notation type is used for AdvPL functions introduction and explanation. This notation convention and symbols are displayed below:

 

  • The reserved key-words that identify the AdvPL function names are always written in capital letters, followed by parentheses. Example: SQRT() – square root function.
  • The arguments that must be indicated by the reader are displayed between the Example: SQRT(<expressão numérica>).
    • The signs < e > are not part of the function syntax, they are only used to represent the information that must be provided by the reader.
    • The optional arguments of some functions are displayed between square brackets [  ]. It means the reader might add these arguments when using the function as they are optional. Excepting the arrays declarations, the square brackets are not part of the function syntax. They are only used to represent the part that can be optionally indicated by the reader. Example:
      • STR(<expressão caracter> [, <expressão numérica 1> ] [, <expressão numérica 2> ]).
      • The alternate options of some functions are indicated through the forward slash ( / ).
      • The functions name defined by the programmer, that is, functions that do not belong to the AdvPL have the first letter of its name displayed in capital letter and the remained ones are displayed in lower case letters. Example: Calcmed().
      • The file names are displayed in capital letters. Example: MATA020.PRW.

 

First, the functions are displayed in alphabetic order. But, a topic grouping the functions by functionality are at the end of the documentation.

  • No labels