Home

TOTVS Technology

Child pages
  • Variadic
Skip to end of metadata
Go to start of metadata

Scope
Version 17.3.0.0 and later

From version 17.3.0.0, the resource of parameter of variadic type is available for TL++. Variadic is a type of data to be used in functions that need to receive a variable amount of parameters. For a proper use, the function must have types of all parameters properly defined, besides, the Variadic parameter must be displayed only once and in the last position of the list of parameters. To get to know the amount of parameters that were passed in a function call using Variadic, access the :vCount propriety. And to access the parameters themselves must access the :vArgs\[<position of parameter>\] propriety; To illustrate the use, in the following example, a function receiving a variable amount of parameters and print all values received:

Variadic.tlpp
Function exemplo(parm As Variadic)
   Local i
   For i := 1 To parm:vCount
     Conout(parm:vArgs[i])
   Next
Return



  • No labels