Top
Back: 5.1.11 contract
Forward: 5.1.13 defined
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.12 dbprint

Syntax:

dbprint ( int_expression, expression_list )

Type:

none

Purpose:

applies the print command to each expression in the expression_list if int_expression is positive. dbprint may also be used in procedures in order to print results subject to certain conditions.

Syntax:

dbprint ( expression )

Type:

none

Purpose:

The print command is applied to the expression if printlevel>=voice.

Note:

See Guidelines for writing a library, for an example how this is used for displaying comments while procedures are executed.

Example:
 
  int debug=0;
  intvec i=1,2,3;
  dbprint(debug,i);
  debug=1;
  dbprint(debug,i);
→ 1,2,3
  voice;
→ 1
  printlevel;
→ 0
  dbprint(i);

See Debugging tools; print; printlevel; voice.


Top Back: 5.1.11 contract Forward: 5.1.13 defined FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.