PRINTF

A string printer and desk calculator.

SYNOPSIS

print [ string ]

DESCRIPTION

This command is similar to the echo command. The only difference is that it splits its arguments up into white space separated pieces and passes each piece separately to the real number parser. Both quotes and parenthesis can be used to print spaces. This command is most useful in connection with the movie parameter of the diffuse command.

EXAMPLES

printf jimmin at the jimjam frippin at the frotz
This will send the string
jimmin at the jimjam frippin at the frotz
to the standard output.

printf ( 15.0 - 12.0 * exp( 4.0 - 2.0 / 6.0 ) )
This will print the result of the arithmetic expression, which is of course, 8.373.

printf ( 15.0 * exp ( -2.0 / (8.62e-5 * 1173.0) ) (12.0 * sqrt(2.0) )
This will print:
3.853e-8 16.97

printf "The Time is: " $time
Inside the movie parameter of the diffuse command, $time is a variable that is set to the current time in the diffusion cycle. Consequently, if this is used there, the command will print:
The Time is: 0.1

printf xfn(0.0, 0.0) yfn(0.0, 0.0) zfn(0.0, 0.0)
This will print the x location where y and z are both zero, the y location where x and z are both zero, and the z location where x and y are both zero.

BUGS

No known bugs.

SEE ALSO