sRESULT is never used in this Macro

Navigation:  Messages > Macro Compiler Messages > Hints >

sRESULT 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 sRESULT within a macro.

 

var

begin

 bRESULT = IsWeekEnd(n_TokenDate)

end

 

This omission may not be a problem under certain circumstances :

 

You do not wish the macro token to be replaced by any text, the value of bRESULT will result in the textbox being modified or deleted.

 

The text replacement used for the macro token is not calculated in the macro. The text replacement is set in the script and only depends on the value of bRESULT.

 

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

 

var

begin

 sRESULT = ''

 bRESULT = IsWeekEnd(n_TokenDate)

end

 

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


Topic 108287 updated on 07-Feb-2003.
Topic URL: http://www.qppstudio.net/webhelp/index.html?sresultisneverusedinthismacro.htm