Neither bRESULT nor sRESULT is assigned a value in this Macro

Navigation:  Messages > Macro Compiler Messages > Warnings >

Neither bRESULT nor sRESULT is assigned a value in this Macro

Previous pageReturn to chapter overviewNext page

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 by Q++ 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 totally familiar with the macro language and programming in general.


Topic 171270 updated on 11-Apr-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?neitherbresultnorsresultis.htm