NAME

printf - C-like formatted printing


SYNOPSIS

printf("format string", var1[, var2 ...])

Parameters inside the [brackets] are optional.


DESCRIPTION

printf will print a formatted version of the values its arguments to the screen using a syntax similar to the C "printf" command. The printf formatting can truncate floating point numbers to integers in the output. printf returns 0 to the Minc environment.

printf will ignore the value set for printing using the set_option, print_on or print_off commands and always print its arguments.


ARGUMENTS
"format string"
The C-syntax format string (i.e. "%d, %f, %3.2f, %s, \n" .. etc.) used to format the output that will appear on the screen.

var1, var2...
The variables to be printed, corresponding to the format string.


EXAMPLES

The following scorefile:

a = 7.8
printf("the value of a is: %f, %s\n", a, "so THERE!")
will produce the following output:
the value of a is: 7.8, so THERE!


SEE ALSO

print, type, dumptable, set_option, print_on, print_off