How can I get rid of the warnings on singleton variables?

In most cases, typos are singleton variables. The compiler reports singleton variables in order to help you detect typos. You can set the Prolog flag singleton to off in order to get rid of the warnings.
      set_prolog_flag(singleton,off)
A better way to get rid of the warnings is to rename singleton variables, such that they all start with the underscore _.



Neng-Fa Zhou 2013-01-25