bRESULT is never used in this Macro

Navigation:  Messages > Macro Compiler Messages > Hints >

bRESULT is never used in this Macro

Previous pageReturn to chapter overviewNext page

This macro compiler hint occurs if you never assign a value to a bRESULT within a macro.

 

var

begin

 if IsWeekend(n_TokenDate)

         sRESULT = 'weekend'

 else

         sRESULT = 'weekday'

 endif

end

 

This omission may not be a problem if you are not trying to modify the text or textbox attributes as a result of this macro, hence the value of bRESULT is irrelevant.

 

When you do not set a value to bRESULT, it will keep the result initially given to it by Q++ : false. So the above example is equivalent to the following :

 

var

begin

 bRESULT = false

 if IsWeekend(n_TokenDate)

         sRESULT = 'weekend'

 else

         sRESULT = 'weekday'

 endif

end

 

To avoid this hint, and to clearly indicate that you know that bRESULT should be false, you should get in the habit of specifically setting the value of bRESULT to false, even if you do not plan on using that variable.


Topic 108288 updated on 10-Mar-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?bresultisneverusedinthismacro.htm