Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Hints

sRESULT is never used in this Macro

Scroll Prev Up Next More

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

var
begin
   bRESULT = IsWeekEnd(n_TokenDate)
end

Under certain circumstances, this omission may not be a problem:

 

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 it initial value; a blank.

 

So the above example is equivalent to the following:

var
begin
   sRESULT = '' // more clear
   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, last updated on 19-Apr-2020