Calling Functions

Navigation:  Macros > Macro Language >

Calling Functions

Previous pageReturn to chapter overviewNext page

The syntax for a function call is simple, and is the same whether you are calling one of Q++Studio's Built-in Functions or one of the user-defined functions at the top of your macro.

 

In all cases, use the function name followed by a list of expressions, separated by commas, of data type corresponding to the function prototype.

 

Today()

GetEasterFor(nYear)

 

The result of a function call can either be assigned to a variable

 

nToday = Today()

nDateEaster = GetEasterFor(nYear)

 

or it can be used as parameter of another function call, as below, in nested function calls.

 

nWeekDay = WeekdayOf(Today())

nMayFirst = FirstDateOfMonth(YearOf(Today()),5)

 

Some functions are called void, because they do not return any result. These are usually function that act on the database or on the textbox that contains the current macro token. They are called simply, without assigning their result.

 

Reset_FindNextHolidayOnDate()

SetBoxTop(25952256)

 

To find out which functions are available to you, and how to use them, you can either look up the Built-in Functions section below, or from within the Code Editor press F3 to invoke the Q++ Code Completion feature.


Topic 105130 updated on 14-Jul-2017.
Topic URL: http://www.qppstudio.net/webhelp/index.html?callingfunctions.htm