| option |
type |
(see also formatting
output below) |
| --- |
--- |
- WRITE() "pi = ", 2*ACOS(0) ! prints pi = 3.141592654 to the next script window row, column 1. This can be changed by the Row and/or Col option
|
|
NUM |
- WRITE(win=window_handle) list ! if needed the window scrolls up
|
|
txt |
- WRITE(T=charstring) list ! write list to CHARACTER
string
To
use the
keyword: - WRITE(Text=oldstring, append, fmt="a, f5.2") " this is appended:", pi
|
|
txt |
- OPEN(file=filename) ! default: formatted sequential file
-
OPEN(file=filename, SEQuential, UNFormatted) ! unformatted sequential file
- WRITE(FIle=filename) io_list ! (write sequential file)
- writes list of input/output items
-
FORmatted: carriage return plus line feed character terminate each WRITE.
Missing Format=... writes free format with blanks separating numeric options -
other commands particular to file output see file_output
options
|
|
num |
- WRITE(print=p) list ! p=1: print to line printer, p=1+8 close printer. See Print
for details
|
|
[T] |
- WRITE(sb, Name) a, b ! writes symbolic names with values: "a=... b=..."
|
|
[T] |
- WRITE(clipbd) list !
to paste it somewhere else
|
|
txt |
- WRITE(Messagebox=options, IOS=selected_button) io_list
- The user must respond before HicEst
can continue
- the string options may contain one symbol each for
- the icon displayed with message, default is none
| ? question-mark |
! exclamation-mark |
i information |
S stop-sign |
- the button combination
o= ok |
y= yes no |
a= abort retry ignore |
default: O= ok cancel |
R= retry cancel |
Y= yes no cancel |
- 1 or 2 or 3: the default button number highlighted when the message box is first displayed
default is 1 - M: system modal box: All applications are suspended until the user responds.
- WRITE(Msg="y?", IOStat=button_nr, Format="A, U|it is |WWW CCYY/MM/DD HH:mm, a") "Time for coffee?", 0
- Message box yes/no (y), ? icon, default button 1.
- The bar symbols separate title and text, or lines, resp.
- A value of zero is printed as the
by the time format prefix U.
- Button titles are localized by Windows
|
| |
|
options |
|
txt |
There are numerous ways to format numerics or strings, . Here are 6 examples for mixed string and numeric output: - :
- WRITE() "pi = ", pi ! write to screen
pi = 3.141592654
- the numeric
option:
without Format option. Includes decimal point but no signs
- WRITE(LENgth=5) pi, -pi/2, 123, 12345678
3.142 -1.571 123 124E5
-
Format: :
- WRITE(T=t3, Fmt="LeftalignedText........ pi= 0.0000 pi^2= 000.00") "Picture format:", pi, pi^2
Picture format: pi= 3.1416 pi^2= 9.87
- CSV
(or other special characters).
With only 1 special character in Format this becomes the separator between list items - WRITE(Format=";") "pi = ", pi, pi^2
pi =;3.141592654;9.869604401;
- : 2 identical list item separators in a format string of length 2.
Apart from ' and " most special characters can work as
(here e.g. ~) - WRITE(Format=~""~) day, month, year, time
"29" "October" "2007" "23.59"
-
like the string ("A") and floating point ("F") specifiers
- WRITE(Fmt="a, f3, f8.4") "pi = ", pi, pi^2
pi = 3.1 9.8696
|
|
[T] |
For numeric and string variables and array elements include
- WRITE(Name ) 123, i, pi ! outputs: 123 i=3 PI=3.141592654
- WRITE(N) text ! outputs: text=... (maximum 100 characters)
|
| |
|
options pertinent to all output media |
|
NUM |
- WRITE(ItemS=n) pi, pi*pi, pi^3 ! n is assigned 3
|
|
NUM |
ios=stat ! stat gets completion code |
|
LBL |
err=999 ! on error jump to label 999 |
| |
|
options particular to |
|
txt |
- WRITE(decor="RA=1") ! write blue border RectAngle, see
DeCoRation
|
|
txt |
The following keywords can be combined in the string argument | Left |
Right |
Center horizontal |
Top |
Bottom |
Vertical center |
Word wrap |
Xpand tabs |
Single line |
- only the capitals are required, e.g.
- WRITE(a="CentWr", PoinT=240) "hello world" ! huge letters
- with the COLumnS
option "Pageprompt" and "0" (to clear page) are possible
- the default is Left+Xpand (+Word wrap for strings with linefeed character)
|
|
num |
- WRITE(Backcol=color_nr) ! see Colors, : color_nr=1
|
|
num |
- WRITE(Forecol=color_nr) ! e.g. black=0, blue=1, green=2, red=4, etc.
|
| |
|
options particular to |
|
num |
|
|
num |
- WRITE(file=filename, close=value) list
- value=1 closes the file after list is written
- value=0 keeps the file open
- value=-1 writes list and truncates a non-sequential file
|
|
log |
- WRITE(file=filename, delete=n) ! delete if n /= 0, keep if n == 0
|
|
log |
- WRITE(file=filename, flush=n) list ! for n /= 0 write buffer to disk without closing the file
|
|
txt |
- WRITE(file=filename, rename=full_path_new_file_name)
- filename should not be OPENed
- This can be far more efficient than to call the command interpreter via SYSTEM
- Use REName to :
- WRITE(file=filename, rename="\other_folder\"//filename)
|
| |
|
speciality: , for more see
MatrixExplorer
|
| |
|
- OPEN(FIle=nam, fmt="6 ,") ! open a standard sequential file, but define 6 records per row, separated by blanks
- nam(123, 4) = str ! writes str to element 4 of row 123 of file "nam"
- nam(row_nr, column_nr, *999) = str ! on error control is transferred to label 999
⇒ more on labels
- WRITE(FIle=nam, Row=123, Column=4) str123_4, str123_5 ! sequentially write multiple column elements in a row
|
| |
|
options particular to |
|
num |
- WRITE(Column=1/2, Row=0.5) pi ! left adjusted middle of screen
- Units are for H=0...0.9999 in % screen height
- for H>1 in character heights of default font nr=1 if no option FONt=nr is noted
- for H<0 in pixels
|
|
num |
analogous to Column |
|
num |
-
- prompt for new page if Align
has no "P"
- clear page first if Align string has no "0"
- ! this short program loops from 0 to 2*pi in steps of pi/100. i, sin(i), cos(i) ) are written to the script window. When the screen bottom is reached, a new column is started. After the 4th column a message suspends further output.
- DO i = 0, 2*pi, pi/100
-
WRITE(COLumnS=4, FONt="Courier", Format="3f8.3") i, SIN(i), COS(i)
- ENDDO
|
|
txt |
- WRITE(font="Arial") list ! see
Fonts
|
|
[T] |
- WRITE(bold) list ! bold or bold=1: bold font on, bd=0: bold font off
|
|
[T] |
- WRITE(italic=1) list ! italic or italic=1: italic font on, italic=0: italic font off
|
|
[T] |
- WRITE(ulin=val) list ! ulin or ulin=1: underlined font on, ulin=0: underline off
|
|
num |
- WRITE(point=p) list ! p = font size in points. p=0 will call the font manager
|
|
num |
- WRITE(Rotate=degrees) list ! rotates font counter clockwise, default is degrees=0. Not with Align option
|