ascot diagnostics

A7762

Hint: ‘{name}’ is never read before it is assigned; Output fits better than ByRef

The method never reads the incoming value of this ByRef formal argument. Any read comes after an assignment or goes through $Get or $Data. The method only produces the value, which is what Output declares. IRIS runs ByRef and Output formal arguments the same way. Change ByRef to Output, unless a caller is meant to pass a value in.

IRIS compiles the example.

Class Demo.ByRefNeverRead
{

ClassMethod Defaults(ByRef timeout As %Integer) //! A7762
{
    Set timeout = 30
}

}

All diagnostics