1
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
! MIDAS procedure data.prg implements WRITE/IMAGE
4
! K. Banse 910104, 930324, 950306, 070314, 110125
6
! execute via WRITE/IMAGE frame pix_specs data all_flg process_flg
7
! or WRITE/IMAGE CURSOR,option,[npx],[nln] constant process_flg
9
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++
11
! save first letter of command in keyword ACTION
12
action(1:1) = mid$cmnd(1:1)
13
write/keyw history "WRITE/IMAGE "
15
define/param p1 ? IMA "Enter image name: "
16
define/local hidehead/c/1/1 N !needed because of READ/IMAGE
18
if p1(1:6) .eq. "cursor" then !here with CURSOR option
20
write/keyw in_a * !this means the displayed frame
21
define/param p2 ? N "Enter constant: "
22
define/param p3 S C "Enter process flag: "
24
write/keyw inputi/i/1/3 0,5,5
25
write/keyw inputc {p2} !store constant to write
26
if p1(8:8) .eq. "1" then
28
elseif p1(8:8) .eq. "C" then
30
if p1(9:9) .eq. "," then !cursor,C,nolines
31
if m$index(p1(10:),",") .gt. 1 then
32
write/keyw inputi/i/2/2 {p1(10:)} !npix[,nline] for window
34
inputi(2) = {p1(10:)} !nline = npix for square w.
42
if p3(1:2) .eq. "AL" then !the mixup of the all flag...
43
define/local process/c/1/1 S
45
define/local process/c/1/1 {p3(1:1)}
48
else !here with "real" image name
51
define/param p2 <,<,20 C "Enter xsta,ysta,nopix: "
52
define/param p5 S C "Enter process flag: "
55
if mid$in(1:1) .ne. "F" then
56
define/local nn/i/1/1 0
57
nn = m$index(p2,",t") !test for name,table
58
if nn .lt. 1 nn = m$index(p2,",T")
60
define/param p3 ? N "Enter data values: " !data required
62
define/param p3 + N "Enter data values: " !data possible
65
write/keyw inputc {p3}
66
define/local process/c/1/1 {p5(1:1)}