Assigning Values to Variables
bIsLeapYear = false
nYear = 1999
sMyName = 'Olivier'
nCount = nCount + 23
nToday = Today()
nDateEaster = GetEasterFor(nYear)
nWeekDay = WeekdayOf(Today())
nMayFirst = FirstDateOfMonth(YearOf(Today()),5)
•The equal sign used is not the same as the equal sign you encountered in high school algebra. The instruction x = y does not test if x equals y; it does not define x as being equal to y; it tells the computer to make the value of x the same as the value of y, now.
•However, the values of x and y may each be modified in subsequent instruction so that x is never equal to y again.
•The equal sign here is not to be confused with the strict equality operator ==, which tests for equality.
Assignments, although simple, are the cornerstone of Macros, since the ultimate goal of any macro is to assign a value to sRESULT or bRESULT or both. The value of these 2 variables is then used, along with the corresponding Macros Rules property, to determine how Macro Tokens are processed by Q++Studio.