Hint: ‘{name}’ is read before it is assigned; ByRef fits better than Output
An Output parameter read before any path writes it: the body depends on the value passed
in, which Output disclaims, since a caller may leave the argument out or pass an undefined
variable; ascot takes the parameter as undefined on entry, so the read is also reported as
undefined. IRIS compiles either; the caller’s . alone passes by reference, and the mode
documents intent. If the body does rely on the incoming value, ByRef says so; assigning
the parameter before reading it keeps Output.
IRIS compiles the example.
Class Demo.OutputReadFirst
{
ClassMethod Tally(count As %Integer, Output total As %Integer) //! A7781
{
Set total = total + count //! A7095
}
}