~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/proc/tbl3bdf.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!
 
2
! Midas procedure tbl3bdf.prg
 
3
! Copy image file from/to 3Dtable column
 
4
 
5
! K.Banse       ESO/SDD
 
6
 
7
! 100813        creation
 
8
! 100831        last modif
 
9
 
10
if MID$CMND(11:11) .eq. "I" then
 
11
   ! COPY/IMT3
 
12
   ! use via: @ tbl3bdf input_ima table colref,rowno felem,noelms upda_flag
 
13
 
 
14
   define/para p1  ?  I "input image:"
 
15
   define/para p2  ?  T "result table:"
 
16
   define/para p3  *  C "col_ref,row_no:"
 
17
   define/para p4  *  C "1st element,no. of elements:"
 
18
   define/para p5  NO  C -
 
19
      "flag (Update/NO_update) OR no_of_rows to allocate:"
 
20
   !
 
21
   write/keyw  in_a/c/1/80     {p1}
 
22
   write/keyw  out_a/c/1/64    {p2}
 
23
   write/keyw  inputc/c/1/24   {p3}
 
24
   write/keyw  inputc/c/31/20   {p4}
 
25
   !
 
26
   inputc(26:26) = "?"
 
27
   if m$tstno(p5) .eq. 1 then
 
28
      inputc(26:26) = "X"
 
29
      write/keyw inputi {p5}
 
30
   else
 
31
      if p5(1:1) .eq. "U" then
 
32
         if m$exist(out_a) .eq. 1 then
 
33
            inputc(26:26) = "U"
 
34
         else
 
35
            outputc(1:) = out_a // ".tbl"
 
36
            if m$exist(outputc) .eq. 1 then
 
37
               out_a(1:) = outputc(1:)
 
38
               inputc(26:26) = "U"
 
39
            endif
 
40
         endif
 
41
      endif
 
42
   endif
 
43
 
 
44
   if p3(1:1) .eq. "*" p3(1:2) = "? "
 
45
   if p4(1:1) .eq. "*" p4(1:2) = "? "
 
46
   write/keyw  history/c/1/80  "COPY/IMT3 {p1} {p2} {p3} {p4} {p5}"
 
47
   run MID_EXE:bdf3tbl
 
48
   !
 
49
else
 
50
   ! COPY/T3IMA
 
51
   ! use via: @ tbl3bdf table column nrlo,nrhi felem,noelem startx,stepx result
 
52
 
 
53
   define/para p1  ?    T  "input table:"
 
54
   define/para p2  ?    C  "column:"
 
55
   define/para p3  1,1  C  "1st row, no. of rows:"
 
56
   define/para p4  *    C  "1st elem, no. of elements in array column:"
 
57
   define/para p5  *    C  "xstart,xstep[,ystart,ystep] :"
 
58
   define/para p6  tbimage  I  "result image:"
 
59
   !
 
60
   write/keyw  in_a/c/1/60     {p1}
 
61
   write/keyw  inputc/c/1/60   {p2}
 
62
   define/local row/c/1/60      {p3}
 
63
   define/local dim/c/1/60      {p4}
 
64
   define/local coor/c/1/60     {p5}
 
65
   write/keyw  out_a/c/1/80     {p6}
 
66
   !
 
67
   if p4(1:1) .eq. "*" p4(1:2) = "? "
 
68
   if p5(1:1) .eq. "*" p5(1:2) = "? "
 
69
   write/keyw  history/c/1/80  "COPY/T3IMA {p1} {p2} {p3} {p4} {p5} {p6}"
 
70
   !
 
71
   run MID_EXE:tbl3bdf
 
72
endif