ascot diagnostics

A1817

Warning: Variable ‘{name}’ is already NEW’d; this NEW discards its current value

A New of a variable the same body has already New‘d. IRIS compiles and runs it; all it does is leave the variable undefined until it is set again, its current value gone, which Kill says outright. Delete the second New, or write the Kill it stands for.

IRIS compiles the example.

ROUTINE Demo.RedundantNew
Main
    New count
    Set count = 1
    Write count, !
    New count //! A1817
    Set count = 2
    Write count, !
    Quit

All diagnostics