Built-in Macro Functions
From within a Macro, you can call almost all the functions used internally by Q++Studio (they are listed in the following sections). Each function takes in parameters which can be boolean, integer/date or string/text and returns a values which can be boolean, integer/date or string/text.
The types of parameters taken by a function and its return type make up what is called the function prototype. An example might be :
int = SomeFunction(n,n,s)
This prototype means that SomeFunction returns an integer value, and takes, in that order, an integer, another integer and a string as parameters.
The names of the parameters shown in the function prototype are just there for illustration purposes, the only thing that matters is that you pass the right type of parameters, in the right order, to each function you use. Usually, the names chosen for the parameters should indicate what the parameter should represent. Consider the following prototypes :
int = FirstDateOfMonth(nYear,nMonth)
str = IntToStr(nAnyNumber)
In the first prototype, it is clear that the parameters each have a very specific meaning, although the compiler will accept any 2 numbers. But in the second prototype the number passed to the function has no particular meaning. Finally, a word about the examples. The examples are supposed to make sense if you read the variable names to yourself. Often a good example is worth pages of explanations; don't skim, take the time to read them.
You can browse macro functions grouped topically, see: Astronomy, Dates, Chinese Dates, Islamic Dates, Jewish Dates, Ephemeris, Grid Layout, Holidays, Lists, Math, Messages and Logging, Moon, Planets, Text, Textboxes, Tokens, Zodiac, or alternatively, you can access the Alphabetical List of All Macro Functions.