printf

Print using a C-like format.


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


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