Function
A compiler directive that tells the compiler it must not issue a warning if its argument is bound but not referenced.
ignore variable => ()
common-extensions
common-extensions
When the compiler encounters a variable that is bound but not referenced, it normally issues a warning. The ignore function is a compiler directive that tells the compiler it must not issue this warning if variable is bound but not referenced. The ignore function has no run-time cost.
The ignore function is useful for ignoring arguments passed to, or values returned by, a function, method, or macro. The function has the same extent as a let; that is, it applies to the smallest enclosing implicit body.
Use ignore if you never intend to reference variable within the extent of the ignore. The compiler will issue a warning to tell you if your program violates the ignore. If you are not concerned about the ignore being violated, and do not wish to be warned if violation occurs, use ignorable instead.
This function ignores some of its arguments:
define method foo (x ::<integer>, #rest args) ignore(args); ... end
Here, we use ignore to ignore one of the values returned by fn:
let (x,y,z) = fn(); ignore(y);