This compiler warning is generated if it is possible for the value of bRESULT to be undefined at the end of a macro.
In the example below, bResult is undefined if the function HolidayOfListOnDate returns false.
var
begin
if HolidayOfListOnDate('a', n_TokenDate)
bRESULT = true
endif
end
Usually this type of warning occurs using branching without specifying what happens in the else case.
There are 2 way to address this warning, using the above example:
var
begin
bRESULT = false
if HolidayOfListOnDate('a', n_TokenDate)
bRESULT = true
endif
end
or alternatively, and more simply:
var
begin
bRESULT = HolidayOfListOnDate('a', n_TokenDate)
end
Note that you should also include an else statement in switch statements.
Topic 110124, last updated on 18-Apr-2020