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

« back to all changes in this revision

Viewing changes to contrib/template/examples/exa10.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
! Example 10, MIDAS procedure exa10.prg 
 
3
!+
 
4
DEFINE/PARAM P1 ? IMA "Enter root_name for input frames: " 
 
5
DEFINE/PARAM P2 ? IMA "Enter root_name for output frames: " 
 
6
DEFINE/MAXPAR 2 ! max. 2 parameters expected
 
7
SET/FORMAT I4           ! we need 4 digits
 
8
WRITE/KEYWORD N/I/1/1 0
 
9
WRITE/KEYWORD NN/I/1/2 0,0 ! 
 
10
DO N = 1 50                     ! default increment is 1
 
11
    NN(1) = 2*N 
 
12
    NN(2) = NN(1)-1 
 
13
    COMPUTE/IMAGE {P2}{N} = {P1}{NN(2)}+{P1}{NN(1)}
 
14
                                 ! sum up
 
15
    LOAD/IMAGE {P2}{N} 
 
16
                                 ! display the result frame
 
17
ENDDO