Mercurial > hg > camir-aes2014
annotate core/tools/cprint.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 function cprint(l, varargin) |
wolffd@0 | 2 % --- |
wolffd@0 | 3 % function cprint(l, varargin) |
wolffd@0 | 4 % |
wolffd@0 | 5 % sprintfs statement varargin if verbosity level |
wolffd@0 | 6 % globalvars.debug >= l |
wolffd@0 | 7 % |
wolffd@0 | 8 % lvl 1: error / very important info |
wolffd@0 | 9 % lvl 2 : warning, mid-level runtime info |
wolffd@0 | 10 % lvl 3 : high-frequency runtime / debug info |
wolffd@0 | 11 % |
wolffd@0 | 12 % --- |
wolffd@0 | 13 |
wolffd@0 | 14 global globalvars; |
wolffd@0 | 15 |
wolffd@0 | 16 if isfield(globalvars, 'debug') && globalvars.debug >= l |
wolffd@0 | 17 display(sprintf(varargin{:})); |
wolffd@0 | 18 end |
wolffd@0 | 19 end |