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 no value is assigned to sRESULT, it retains its initial value: the empty string ('').

 

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 the empty string (''), you should get in the habit of specifically setting the value of sRESULT to the empty string (''), even if you do not plan on using that variable.

 


Topic 108287, last updated on 17-Oct-2026