Version 0 of Empty Lines

Updated 2018-06-07 12:46:03 by CecilWesterhof

Created by CecilWesterhof.

I use tcl mostly for command-line tools. Often I want to output several empty lines. For this I created the following proc:

proc emptyLines {{lines 3}} {
    if {![string is integer -strict ${lines}]} {
        error "lines should be an integer (${lines})"
    }
    if {${lines} < 0} {
        error "lines cannot be negative (${lines})"
    }
    puts -nonewline [string repeat \n ${lines}]
}

As always: comments, tips and questions are appreciated.