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
|
WINdowhandle |
NUM |
- WRITE(win=window_handle) list
! if needed the window scrolls up
|
Text |
txt |
- WRITE(T=charstring) list
! write list to
CHARACTER string
To use the APPend keyword:
- WRITE(Text=oldstring, append, fmt="a, f5.2") " this is appended:", pi
|
FIle |
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
|
PRint |
num |
- WRITE(print=p) list
! p=1: print to line printer, p=1+8 close printer. See
Print for details
|
StatusBar |
[T] |
- WRITE(sb, Name) a, b
! writes symbolic names with values: "a=... b=..."
|
ClipBoard |
[T] |
- WRITE(clipbd) list
! to paste it somewhere else
|
TitleBar |
[num] |
- WRITE( TitleBar, Format="UWWW HH:mm:SS") 0
! writes Thu 18:19:07 to the script window titlebar.
-
! With the additional keyword WINdowhandle=handle the child window titlebar is written.
|
Messagebox |
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
- button combinations
- o = ok
- y = yes no
- a = abort retry ignore
- O = ok cancel (default)
- 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
- A, B, C:
GOTO target, or
CALL "target" if button 1, 2, 3 was selected
(label) (subroutine) no action if no such target
- M = system modal box: All applications are suspended until the user responds.
- WRITE(Msg="y?B", IOStat=button_nr, OnButton="TEA", 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.
- Msg= "B" calls the subroutine "TEA" when the user hits "No", e.g.
|
|
|
Options for |
Format |
txt |
There are many ways to format numbers or strings. Here are some examples for mixed string and numeric output:
- :
- WRITE() "pi = ", pi
! write to screen
- (Fortran) like the string ("A") and floating point ("F") specifiers to exactly specify length and precision
see Format :
- WRITE(Format="2(A10, F18.15 /)") "pi=", 4*
ATAN(1), "22/7 =", 22/7
- pi= 3.141592653589793
- 22/7 = 3.142857142857143
- the numeric LENgth option: without Format option. Includes decimal point but no signs
- WRITE(LENgth=5) pi, -pi/2, 123, 12345678
-
picture: :
- 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"
|
|
|
options pertinent to all output media |
ItemS |
NUM |
- WRITE(ItemS=n) pi, pi*pi, pi^3
! n is assigned 3
|
IOStat |
NUM |
ios=stat ! stat gets completion code |
ERror |
LBL |
err=999 ! on error jump to label 999 |
|
|
options particular to screen and print output |
DeCoRation |
txt |
|
Align |
txt |
The following keywords can be combined in the string argument
- Left (L for short)
- Right (R)
- Center horizontal (C)
- Top (T)
- Bottom (B)
- Vertical center (V)
- Word wrap (W)
- Xpand tabs (X)
- Single line (S)
- 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)
|
BaCkcolor |
num |
- WRITE(Backcol=color_nr)
! see
Colors, : color_nr=1
|
ForeColor |
num |
- WRITE(Forecol=color_nr)
! e.g. black=0, blue=1, green=2, red=4, etc.
|
|
|
options particular to |
Rec |
num |
|
CLoSe |
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
|
DELETE |
log |
- WRITE(file=filename, delete=n)
! delete if n /= 0, keep if n == 0
|
FLUsh |
log |
- WRITE(file=filename, flush=n) list
! for n /= 0 write buffer to disk without closing the file
|
REName |
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)
|
|
|
specialty: , 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"
- WRITE(FIle=nam, Row=123, Column=4) str123_4, str123_5
! sequentially write multiple column elements in a row
|
|
|
options particular to |
Column |
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
|
Row |
num |
analogous to Column |
COLumnS |
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. When the screen is full a message suspends further output.
- SYSTEM(FontNr=6, FONt="Arial", PoinT=12, getWidth=chars_per_line)
! set temporary font 6. The WRITE-format "3f8.3" uses 3*8 characters.
- pi = 4*
ATAN(1)
- DO i = 0, 2*pi, pi/100
- WRITE(COLumnS=chars_per_line/24, FONt=6, Format='3f8.3') i,
SIN(i),
COS(i)
-
ENDDO
|
FONt |
txt |
- WRITE(font='Arial') list
! see
Fonts
|
BolD |
[T] |
- WRITE(bold) list
! bold or bold=1: bold font on, bd=0: bold font off
|
ITalic |
[T] |
- WRITE(italic=1) list
! italic or italic=1: italic font on, italic=0: italic font off
|
UnderLine |
[T] |
- WRITE(ulin=val) list
! ulin or ulin=1: underlined font on, ulin=0: underline off
|
PoinT |
num |
- WRITE(point=p) list
! p = font size in points. p=0 will call the font manager
|
ROTate |
num |
- WRITE(Rotate=degrees) list
! rotates font counter clockwise, default is degrees=0. Not with Align option
|