Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Compiler Messages > Warnings

Neither bRESULT nor sRESULT is assigned a value in this Macro

Scroll Prev Up Next More

This compiler warning is generated if no value is assigned to either sRESULT or bRESULT anywhere in a macro.

 

Generally this warning should always be addressed, otherwise your macro will have no effect at all.

 

Below is an example:

var
   bHolidayToday sTokenValue   
begin                                                
   bHolidayToday = HolidayOfListOnDate('a', n_TokenDate)
   sTokenValue = EvalToken(n_TokenDate, s_TokenRoot)
end                     

The above macro verifies if there is a holiday on the token date, and converts the token. But never sets a value for bRESULT and sRESULT, the only 2 values that are considered at the end of a macro.

 

So the above macro would have absolutely no effect, regardless of the resulting actions one might have setup in the script.

 

This warning is generated by the failure of a macro to assign a value to either sRESULT or bRESULT, and will still be generated if your macro uses these, as in the example below.

var    
    bTemp sTemp
begin   
    bTemp = bRESULT 
    sTemp = sRESULT
end

The only case when there might be a rationale for ignoring this message is if you are using included macros and saving the result of each macro through global variables. This method is, however, complex and not recommended if you are not familiar with the macro language and programming in general.

 


Topic 171270, last updated on 19-Apr-2020