Hint: ‘{name}’ is read before it is assigned; ByRef fits better than Output
The method reads the incoming value of this Output formal argument. A read comes before
any assignment and does not go through $Get or $Data. The method depends on the incoming
value, which is what ByRef declares. IRIS runs ByRef and Output formal arguments the
same way, and the read raises <UNDEFINED> when a caller passes no value. Change Output
to ByRef if the method needs the incoming value, or else assign the formal argument before
reading it.
IRIS compiles the example.
Class Demo.OutputReadFirst
{
ClassMethod Tally(count As %Integer, Output total As %Integer) //! A7781
{
Set total = total + count //! A7095
}
}