IRAF help page for package language, program fprint

from NOAO USAGEPARAMETERSDESCRIPTIONEXAMPLESBUGSSEE ALSO

fprint -- print to a parameter print -- print to the standard output


USAGE

USAGE

print  expr [expr ...]
fprint param expr [expr ...]

PARAMETERS

PARAMETERS

expr

Any expression, the string value of which is to be printed.

param

Fprint will deposit the output string in the value field of this parameter.


DESCRIPTION

The print and fprint commands format a line of text and write it to either the standard output or in the case of fprint, the p_value field of the named parameter. The output is free format although spaces may be specifically inserted (as quoted string constants) to make the output easier to read. One space is automatically inserted after each numeric argument; this can be defeated by coercing the argument to a string with the str intrinsic function. A newline is automatically output at the end of the output line. I/O redirection may be used with print to write to a file.

Compute mode (a parenthesized argument list) is recommended for this task to avoid surprises.


EXAMPLES

1. Print the name of the current terminal.

cl> print ("terminal = ", envget ("terminal"))

2. Output a blank line on the standard output, e.g., in a script.

print ("")

3. Format a command and send it to the host system. In this example, "fname" is a string valued parameter.

cl> print ("!dir/full ", fname) | cl

4. Write to a file.

	for (x=1.;  x < 1E5;  x *= 10) 
	    print ("the sqrt of ", x, "is ", sqrt(x), >> "output")

BUGS

BUGS The fprint task is not very useful since the same thing can be accomplished by string concatenation and assignment.


SEE ALSO

scan, fscan,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu