UniWrite v1.0 by E.W. --------------------- E.W. has made UniWrite available for all to use freely. Please do not use UniWrite for commercial purposes. This function will write on the current active screen. It will only write inside the client area of the screen. Following functions are facilitated: 1. Writing a line of text using different fonts/modes. 2. Writing multiple lines of text using different fonts/modes. 3. Writing line of text mixed with Pretty Printed formulas. 4. Writing multiple lines of text mixed with Pretty Printed formulas. Syntax: write(x, y, string [, Font:0-2][, Mode:0-4]) write(x, y, {string, string, ....} [, Font:0-2][, Mode:0-4]) write(x, y, {format-string, "expr", ...., format-string, "expr", ..} [, Font:0-2][, Mode:0-4]) x, y : Starting position. (x,y) = (0, 0) is upper left corner of the screen. Negative values of x/y makes the printing start at that position outside the visible area of the screen. Font: 0 = small 1 = medium 2 = big Mode: 0 = white on black (overwrite) 1 = black on white, OR mode 2 = black on white, XOR mode 3 = grey on white 4 = black on white (overwrite) string: any string. "expr": string containing a valid expression. Expressions are printed using Pretty Print. format-string: A format-string is a normal string containing one ore more control characters. Control characters: char(174): is replace by the next expression in the list. There must be an equal number of char(174) in the format-string and expressions that follows the format-string in the list. The max number of char(174) there can be in a format-string is 10. Examples: Writing black on white text at position (x,y)=(6,10) using small font. write(6,10,"text",0) Writing white on black text at position (x,y)=(6,10) using big font. write(6,10,"text",2,0) Writing multi-line black on white text starting at position (6,10) using small font. write(6,10,{"text 1.","text 2.","text 3."},0) Mixing text and Pretty Printed expressions: write(0,0,{"# <=> #","c^2=a^2+b^2","b^2=a^2-c^2"}) Where '#' = char(174) Writing multi-lines of mixed text and Pretty Printed expressions: write(0,0,{"Equations:"," # ","c^2=a^2+b^2", "=> #","b^2=a^2-c^2"}) Where '#' = char(174) Note: Before writing, make sure you switch to the correct screen. For example, if you want to write to the PrgmIO screen, use Disp:write(whatever)