Skip to main content
Version: 1.4.0

Silent variables

When debugging LIGO programs, we might want to ignore a constant after its definition. The LIGO compiler will however likely emit a warning about an unused variable. The solution is to prefix the unused variable by an underscore _, like so:

function f (_x) { return 0; }; // _x is silent

Note that the variable _ is a special case of silent variable:

const _ = 1;
const a = _;