next up previous contents index
Next: Main Functions 3 Up: Main Functions 2 Previous: Text Input   Contents   Index

Text Output

(string) SepString(string, repeat)
This function returns a string that is created by repeating the string argument repeat times. The repeat value is an integer in the range 1-132. The function will fail if string is null.

(int) ShowPrompt(arg_list)
Print the values of the arguments on the prompt line. The number of arguments is variable.
Example:
a = 2.5
b = "the value of a is "
ShowPrompt(b, a)
This code fragment will print ``the value of a is 2.5'' on the prompt line.

If given without arguments, the prompt line will be erased, but without disturbing the current message as returned with GetLastPrompt. The function returns 1 if something is printed (message updated), 0 otherwise.

(int) SetIndent(level)
This function sets the indentation level used for printing with the Print and PrintLog functions. The argument is an integer which specifies the column where printed output will start. The argument can also be a string in one of the following formats:

"+N"
N is an optional integer (default 1), increases indentation by N columns.
"-N"
N is an optional integer (default 1), decreases indentation by N columns.
""
Empty string, does not change indentation.

The function returns the previous indentation level.

(int) SetPrintLimits(num_array_elts, max_zoids)
While printing with the Print family of functions, or when using ListHandle, the number of array points and trapezoids actually printed is limited. The default limits are 100 array points and 20 trapezoids. This function allows these limits to be changed. A value for either argument of -1 will remove any limit, 0 will keep the present limit, non-negative values will set the limit, and negative values of -2 or less will revert to the default values. This function always returns 1 and never fails.

(int) Print(arg_list)
This function will print the arguments on the console. This is the window from which Xic was launched. The number of arguments is variable. The printing is indented according to the level set with the SetIndent function.

Any type of variable can be printed. Handles will be printed as a string giving the handle type. For a zoidlist variable, the coordinates of the trapezoids are printed, one trapezoid per line, in order x-lower-left, x-lower-right, y-lower, x-upper-left, x-upper-right, y-upper. Arrays are printed as a sequence of numbers. The number of array elements and trapezoids printed is limited to 100 and 20, respectively, but these limits can be changed or removed with the SetPrintLimits function.

(int) PrintLog(file_handle, arg_list)
This works like the Print function, however output goes to a file previously opened for writing with the Open function. The first argument is the file handle returned from Open. Following arguments are printed to the file in order, using indentation set with the SetIndent function. The function returns the number of characters written. The function will fail if the handle is not a file handle.

(string) PrintString(arg_list)
This works like the Print, etc. functions, however it returns a string containing the text, and indentation as set with SetIndent is ignored.

(string) PrintStringEsc(arg_list)
This works exactly like PrintString, however, special characters in any string supplied as an argument are shown in their ` \ ' escape form.

(int) Message(arg_list)
This function will print the arguments in a pop-up message window, indentation is ignored.

(int) ErrorMsg(arg_list)
This function will print the arguments in a pop-up error window, indentation is ignored.

(int) TextWindow(fname, readonly)
This function brings up a text editor window loaded with the file whose path is given in the fname string. If the integer readonly is 0, editing of the file is enabled, otherwise editing is prevented.


next up previous contents index
Next: Main Functions 3 Up: Main Functions 2 Previous: Text Input   Contents   Index
Stephen R. Whiteley 2024-09-29