up previous next
VerbosityLevel    --    verbosity level


Syntax
VerbosityLevel(): INT

Description
This function returns the current CoCoA verbosity level.

User defined functions may check this value when deciding whether to print out some internal progress messages: normally printing should happen only if VerbosityLevel() is higher than some threshold value.

Various functions in CoCoALib and in the CoCoA-5 packages do this, but they all have threshold values greater than 9. So threshold values from 1 to 9 may be used in user functions without triggering any verbosity from CoCoA.

Example
/**/ define SimpleFn(n)
/**/   if VerbosityLevel() >= 4 then
/**/     println "SimpleFn: input type is ", type(n);
/**/   endif;
/**/   return n^2;
/**/ enddefine;

/**/  use P ::= QQ[x,y,z];
/**/  SetVerbosityLevel(9);
/**/  SimpleFn(ideal(indets(CurrentRing)));
SimpleFn: input type is IDEAL
ideal(z^2,  y*z,  x*z,  y^2,  x*y,  x^2)

/**/  SetVerbosityLevel(0);  --> unset verbosity
/**/  SimpleFn(ideal(indets(CurrentRing)));
ideal(z^2,  y*z,  x*z,  y^2,  x*y,  x^2)

See Also