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

« back to all changes in this revision

Viewing changes to contrib/template/examples/exa6.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 6, MIDAS procedure exa6.prg 
 
3
!+
 
4
DEFINE/PARAM P1 ? N "Enter alpha value: " -88.5,912.4 
 
5
DEFINE/PARAM P2 ? N "Enter loop_count: " 1,999 
 
6
DEFINE/MAXPAR 2                                 ! max. 2 parameters expected
 
7
WRITE/KEYWORD VAR/R/1/1 0.                      ! init key VAR
 
8
VAR = {P1} * 3.3                                ! see remark a
 
9
  WRITE/DESCR myframe rval/r/1/2 0.0,0.0        !  
 
10
  LOOP:                                         ! declare label LOOP
 
11
  VAR = 1.+VAR                                  ! see remark b
 
12
  myframe,rval(2) = var+12.99
 
13
  WRITE/OUT {$myframe,rval(2)}
 
14
  myframe[@10,@20] = 20.0-{myframe,rval(2)}
 
15
  WRITE/OUT {myframe[@10,@20]}
 
16
  mytable,:DEC,@7 = {myframe[@10,@20]}*2.0
 
17
  WRITE/OUT {mytable,:DEC,@7}
 
18
  WRITE/OUT " "
 
19
  IF VAR .LE. {P2} GOTO LOOP ! go to label LOOP, if VAR <= contents of P2