PRINT Command

The PRINT command prints strings, numbers and other information to screen or the .out file to display the solution progress and for debugging purposes.

The following print commands are available:
Prints text to screen.
Prints the warning messages to the screen.
  • For terminal runs, the string “WARNING” precedes the warning message.
  • For runs from the GUI, the warning message is displayed in colour.
Prints the warning messages to the screen. To stop execution use the !!EXIT statement.
Writes the text to the .out file while the Feko kernel is run.

The print commands accept multiple arguments separated by commas.

Example 1

Print the error message and exit if the variable #a is < 2*#b:
!!print "2*#b = ", 2*#b
!!if #a < 2*#b then
!! print_error "The value of #a is too small:", #a, " (exiting now)"
!! exit

Example 2

Print the value of #b to the .out file at the location where it appears in the .pre file.
!!print_to_out "This run was done with #b = ", #b