summaryrefslogtreecommitdiff
path: root/lang/dynamo/1.8.7/src/dyn.plot+
blob: db04dfcbe611d0c1796425683a63476288cd3118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
PACKET graphics DEFINES graphmode, 
                        attribut, 
                        palette, 
                        move, 
                        plot, 
                        draw line, 
                        draw linetype, 
                        color, 
                        draw to: 
 
 
(* Autor: Giffeler GD *) 
(* Datum: 31.03.1988  *) 
(* Schönbeck SHard    *) 
 
INT VAR linie :: -1, farbe :: 1, dummy; 
 
 
PROC attribut (INT CONST nr): 
 
(* 0..15 Vordergrundfarben fuer Textdarstellung    
   0..7  Hintergrundfarben                         
   Attribut fuer blinkende Darstellung (+128)   *) 
 
  control (-3, nr, 0, dummy) 
 
END PROC attribut; 
 
 
PROC palette (INT CONST nr): 
 
(* Farbauswahl fuer Grafikmodi *) 
 
  control (-4, 0, nr, dummy) 
 
END PROC palette; 
 
 
PROC graphmode (INT CONST mode): 
 
(*   0 -> TEXT 40*25 monochrom    
     2 ->      80*25              
     1 ->      40*25 farbig       
     3 ->      80*25              
     7 ->      80*25 Herkules     
     4 -> GRAFIK 320*200 farbig       
     5 ->                monochrom    
     6 ->        640*200              
    64 -> Olivetti 640*400 monochrom         
    72 ->                  kleine Schrift 
   512 -> Herkules 720*348 monochrom      *) 
 
  control (-5, mode, 0, dummy) 
 
END PROC graphmode; 
 
 
PROC draw linetype (INT CONST pen, color): 
 
(* Linienschraffur und Zeichenfarbe *) 
 
  linie:= pen; 
  farbe:= color; 
  control (-8, linie, farbe, dummy) 
 
END PROC draw linetype; 
 
 
PROC draw linetype (INT CONST nr): 
 
(* Ausschliessliche Aenderung der Linienschraffur *) 
 
  linie:= nr; 
  control (-8, linie, farbe, dummy) 
 
END PROC draw linetype; 
 
 
PROC color (INT CONST nr): 
 
(* Ausschliessliche Aenderung der Zeichenfarbe *) 
 
  farbe:= nr; 
  control (-8, linie, farbe, dummy) 
 
END PROC color; 
 
 
PROC move (INT CONST x, y): 
 
(* Bewegt Zeichencursor zu Koordinaten (0,0 = Links oben) *) 
 
  control (-7, x, y, dummy) 
 
END PROC move; 
 
 
PROC move (REAL CONST x, y): 
 
  control (-7, int(x+0.5), int(y+0.5), dummy) 
 
END PROC move; 
 
 
PROC draw to (INT CONST x, y): 
 
(* Zeichnet Gerade von momentaner Zeichencursorposition nach x,y *) 
 
  control (-6, x, y, dummy) 
 
END PROC draw to; 
 
 
PROC draw to (REAL CONST x, y): 
 
  control (-6, int(x+0.5), int(y+0.5), dummy) 
 
END PROC draw to; 
 
 
PROC draw line (INT CONST x1, y1, x2, y2): 
 
(* Zieht eine Linie von x1,y1 nach x2,y2 *) 
 
  plot (x1, y1); 
  draw to (x2, y2) 
 
END PROC draw line; 
 
 
PROC draw line (REAL CONST x1, y1, x2, y2): 
 
  plot (x1, y1); 
  draw to (x2, y2) 
 
END PROC draw line; 
 
 
PROC plot (INT CONST x, y): 
 
(* Zeichnet einen Punkt *) 
 
  control (-7, x, y, dummy); 
  control (-6, x, y, dummy) 
 
END PROC plot; 
 
 
PROC plot (REAL CONST x, y): 
 
  control (-7, int(x+0.5), int(y+0.5), dummy); 
  control (-6, int(x+0.5), int(y+0.5), dummy) 
 
END PROC plot; 
 
 
PROC draw to (INT CONST x, y, f): 
 
(* Zeichnet Gerade von momentaner Zeichencursorposition nach x,y *) 
 
  color (f); 
  control (-6, x, y, dummy) 
 
END PROC draw to; 
 
 
PROC draw to (REAL CONST x, y, INT CONST f): 
 
  color (f); 
  control (-6, int(x+0.5), int(y+0.5), dummy) 
 
END PROC draw to; 
 
 
PROC draw line (INT CONST x1, y1, x2, y2, f): 
 
(* Zieht eine Linie von x1,y1 nach x2,y2 *) 
 
  plot (x1, y1, f); 
  draw to (x2, y2) 
 
END PROC draw line; 
 
 
PROC draw line (REAL CONST x1, y1, x2, y2, INT CONST f): 
 
  plot (x1, y1, f); 
  draw to (x2, y2) 
 
END PROC draw line; 
 
 
PROC plot (INT CONST x, y, f): 
 
(* Zeichnet einen Punkt mit der Farbe f (0 = schwarz) *) 
 
  color (f); 
  control (-7, x, y, dummy); 
  control (-6, x, y, dummy) 
 
END PROC plot; 
 
 
PROC plot (REAL CONST x, y, INT CONST f): 
 
  color (f); 
  control (-7, int(x+0.5), int(y+0.5), dummy); 
  control (-6, int(x+0.5), int(y+0.5), dummy) 
 
END PROC plot 
 
 
END PACKET graphics; 
 
 
PACKET dynamo plotter plus DEFINES configurate plot, 
                                   initialize plot, 
                                   new plot line, 
                                   plot, 
                                   end of program, 
                                   stop request, 
                                   plot scale: 
 
(* DYNAMO Grafikausgabe           *) 
(* Autor : Giffeler GD            *) 
(* Datum : 29.04.1988, 03.06.1988 *) 
(* Änder.: Christian Szymanski    *) 
(*         21.07.88               *) 
 
 
LET max value         = 330, 
    value page length = 30, 
    max param numb    = 10, 
 
    PARAM = ROW value page length REAL, 
    BIG   = ROW 300 REAL, 
 
    max devices = 3, 
    SWITCH      = STRUCT (TEXT bezeichnung, INT on, off, 
                          zeichenbreite, zeichenhoehe, 
                          h offset, 
                          x, y, breite, hoehe), 
    SIZE        = ROW max devices SWITCH; 
 
 
TYPE PLOTPARAM = STRUCT (TEXT name, REAL lower bound, upper bound); 
 
 
ROW max param numb PLOTPARAM VAR plotparam; 
ROW max value REAL VAR value; 
 
BOOL VAR plt, ende; 
REAL VAR pltper, nextplot; 
INT VAR  value no, param no, plot line no, mode nr, plot param no, line no, 
         xp, yp; 
 
SIZE CONST table :: SIZE: 
           (SWITCH: ("CGA 640 * 200", 6, 2, 8, 8, 5, 4, 20, 615, 102), 
            SWITCH: ("HGC 720 * 348", 512, 0, 0, 0, 0, 0, 0, 0, 0), 
            SWITCH: ("OLI 640 * 400", 64, 2, 8, 16, 10, 4, 25, 615, 223)); 
 
configurate plot; (* Erster Aufruf nach der Insertierung *) 
 
 
PROC plot one page : 
INT VAR loop nr, n, m; 
PARAM VAR x, y; 
BIG VAR xr, yr; 
 
  kopfzeile ("Stuetzstellen:     ", TRUE); 
  xp:= 1; yp:= 19; 
  FOR loop nr FROM 1 UPTO plot param no REP 
    werte aus value in x und y uebertragen; 
    koordinatenkreuz (table[mode nr].x, table[mode nr].y, 
                      table[mode nr].breite, table[mode nr].hoehe); 
    x raster (table[mode nr].x, table[mode nr].y, 
              table[mode nr].breite, table[mode nr].hoehe, n); 
    zusatzinformationen ausgeben; 
    spline (n, m, 1, x, y, xr, yr); 
    draw picture (table[mode nr].x, table[mode nr].y, 
                  table[mode nr].breite, table[mode nr].hoehe, 
                  loop nr, m, 
                  plot param[loop nr].lower bound, 
                  plot param[loop nr].upper bound, 
                  xr, yr); 
    legende ausgeben 
  PER; 
  abbruch; 
  graphmode(table[mode nr].off). 
 
werte aus value in x und y uebertragen: 
INT CONST erh :: plot param no + 1; 
INT VAR z :: 1, w :: loop nr + 1; 
 
  FOR n FROM 1 UPTO value no DIV erh REP 
    x[n]:= value[z]; y[n]:= value[w]; 
    z INCR erh; 
    w INCR erh 
  PER; 
  n DECR 1; 
  m:= n * 10. 
 
zusatzinformationen ausgeben: 
TEXT CONST xn :: text(x[n]); 
 
  cursor (1, 17); put (x[1]); 
  cursor (81 - LENGTH xn, 17); 
  out (xn); 
  cursor (74, 1). 
 
legende ausgeben: 
INT VAR xph, yph; 
 
  cursor (xp, yp); 
  put (plot param[loop nr].name + "="); 
  put (plot param[loop nr].lower bound); 
  put ("-"); 
  put (plot param[loop nr].upper bound); 
  get cursor (xph, yph); 
  draw line (xph * table[mode nr].zeichenbreite -  8, 
             yph * table[mode nr].zeichenhoehe - table[mode nr].h offset, 
             xph * table[mode nr].zeichenbreite + 24, 
             yph * table[mode nr].zeichenhoehe - table[mode nr].h offset); 
  IF xp > 1 THEN line ELSE cursor (40, yph) FI; 
  get cursor (xp, yp). 
 
abbruch: 
TEXT VAR eingabe; 
 
  REP 
    cursor (30, 1); 
    put (39*" "+"(+, p, e)?"); 
    inchar (eingabe); 
    SELECT code (eingabe) OF 
      CASE 43     : eingabe:= "" 
      CASE 69, 101: ende:= TRUE; eingabe:= "" 
      CASE 80, 112: phasendiagramm 
    OTHERWISE out(""7"") 
    END SELECT 
  UNTIL eingabe = "" PER 
 
END PROC plot one page; 
 
 
PROC initialize plot (TEXT CONST h) : 
INT VAR c :: 1, typ; 
TEXT VAR sym, num; 
 
  ende:= FALSE; 
  pltper:= get pltper; 
  plot line no:= value page length; 
  nextplot:= 0.0; 
  value no:= 0; 
  line no:= 0; 
  plot param no:= 0; 
  kopfzeile zerlegen. 
 
kopfzeile zerlegen: 
  scan (h); 
  REP 
    next symbol (plot param[c].name); 
    next symbol (sym, typ); 
    IF sym = "(" THEN 
      next symbol (num); 
      next symbol (sym, typ); 
      IF sym = ")" THEN 
        plot param[c].name CAT ("(" + num + ")") 
      FI 
    FI; 
    WHILE typ < 7 CAND NOT (sym = "(" COR sym = ",") REP 
      next symbol (sym, typ) 
    PER; 
    IF typ < 7 CAND sym = "(" THEN 
      REP next symbol (sym) 
      UNTIL sym = "," PER; 
      REP next symbol (sym, typ) 
      UNTIL typ > 6 COR sym = "," COR sym = "/" PER 
    FI; 
    c INCR 1 
  UNTIL typ > 6 PER 
 
END PROC initialize plot; 
 
 
PROC plot scale (TEXT CONST id, INT CONST scale pointer, 
                 REAL CONST lower bound, upper bound, 
                 BOOL CONST l fixed scale, u fixed scale) : 
 
 plot param no INCR 1; 
 plot param[plot param no].lower bound:= lower bound; 
 plot param[plot param no].upper bound:= upper bound 
 
END PROC plot scale; 
 
 
PROC new plot line (REAL CONST time) : 
 
  plt:= time >= nextplot; 
  IF plt THEN 
    add (time); 
    line no INCR 1; 
    param no:= 0 
  FI; 
  WHILE time >= nextplot REP 
   nextplot INCR pltper 
  PER 
 
END PROC new plot line; 
 
 
PROC plot (REAL CONST r): 
 
  IF plt THEN 
    param no INCR 1; 
    add (r); 
    IF NOT ende CAND param no = plot param no AND 
                     line no = value page length THEN 
      plot one page; 
      value no:= 0; 
      line no:= 0 
    FI 
  FI 
 
END PROC plot; 
 
 
PROC add (REAL CONST r): 
 
  IF NOT ende THEN 
    value no INCR 1; 
    value[value no]:= r 
  FI 
 
END PROC add; 
 
 
PROC spline (INT CONST n, m, s, PARAM CONST x, y, BIG VAR xr, yr): 
 
{ Kubische Splineinterpolation 3. Grades; 2 fach Differenzierbar       } 
{ Quelle: Rita Schmidt, Hahn-Meitner-Institut für Kernforschung Berlin } 
{         "Spline-Prozeduren" (HMI-B 220)                              } 
{ Umsetzung & Modifikation: Giffeler GD, 13.04.1988, 22.04.1988        } 
 
{ n     = Anzahl der Stützstellen                                      } 
{ m     = Anzahl der zu berechnenden Funktionswerte                    } 
{ s     = Index des x-Startpunktes                                     } 
{ x     = x-Werte der Stützstellen (linear steigend)                   } 
{ y     = y-Werte der Stützstellen                                     } 
{ xr    = x-Werte der Punkte, an denen die Funktion berechnet werden   } 
{         soll                                                         } 
{ yr    = y-Werte der Punkte, an denen die Funktion berechnet werden   } 
{         soll                                                         } 
 
 
INT  CONST nn :: n - 1; 
REAL CONST steps :: (real(nn) * (x[2] - x[1])) / real(m - 1); 
 
PARAM VAR q, au; 
REAL  VAR hi, hk, hk1, dij, dim1j; 
INT   VAR k, kk, j, m1, m2, m3; 
 
  q[1]:= 0.0; 
  yr[1]:= x[s]; 
  FOR j FROM 2 UPTO m REP yr[j]:= yr[j - 1] + steps PER; 
  xr:= yr; 
  block 0; 
  FOR k FROM 2 UPTO nn REP block 1 PER; 
  FOR kk FROM 2 UPTO nn REP block 2 PER; 
  FOR j FROM 1 UPTO m REP block 3 PER. 
 
block 0: 
  au[1]:= (y[3] - y[2] - y[2] + y[1]) / ((x[2] - x[1]) * (x[3] - x[2])); 
  au[n]:= (y[n] - y[nn] - y[nn] + y[n - 2]) / 
          ((x[n] - x[nn]) * (x[nn] - x[n - 2])). 
 
block 1: 
INT CONST km1 :: k - 1, kp1 :: k + 1; 
 
  hk:= x[k] - x[km1]; 
  hk1:= x[kp1] - x[k]; 
  q[k]:=  - hk1 / (hk * (q[km1] + 2.0) + 2.0 * hk1); 
  au[k]:= (hk * au[km1] - 6.0 * ((y[kp1] - y[k]) / hk1 - (y[k] - 
          y[km1]) / hk)) * q[k] / hk1. 
 
block 2: 
  k:= nn - kk + 2; 
  au[k]:= q[k] * au[k + 1] + au[k]. 
 
block 3: 
  zeige benutzer das du noch lebst; 
  IF yr[j] < x[1] THEN 
    m1:= 1; 
    m2:= 2 
  ELIF yr[j] > x[n] THEN 
    m1:= n - 1; 
    m2:= n 
  ELSE 
    m1:= 1; 
    m2:= n; 
    wiederholung 
  FI; 
  dij:= x[m2] - yr[j]; 
  hi:= x[m2] - x[m1]; 
  dim1j:= x[m1] - yr[j]; 
  yr[j]:= 1.0 / 6.0 / hi * (au[m1] * dij ** 3 - au[m2] * dim1j ** 3 + 
          (6.0 * y[m1] - hi ** 2 * au[m1]) * dij - (6.0 * y[m2] - hi ** 2 
          * au[m2]) * dim1j). 
 
wiederholung: 
  REP 
    m3:= (m2 + m1) DIV 2; 
    IF yr[j] >= x[m3] THEN m1:= m3 ELSE m2:= m3 FI 
  UNTIL m2 - m1 = 1 PER. 
 
zeige benutzer das du noch lebst: 
  cout (j) 
 
END PROC spline; 
 
 
PROC phasendiagramm: 
REAL VAR l :: maxreal, u :: smallreal; 
BIG VAR x, y; 
INT VAR i, no1, no2; 
 
  IF plot param no > 1 THEN 
    partnerwahl; 
    werte aus value uebertragen; 
    kopfzeile ("Phasendiagramm", TRUE); 
    koordinatenkreuz (table[mode nr].x, table[mode nr].y, 
                      table[mode nr].breite, table[mode nr].hoehe+50); 
    draw picture (table[mode nr].x, table[mode nr].y, 
                  table[mode nr].breite, table[mode nr].hoehe+50, 
                  1, i-1, l, u, x, y); 
    legende 
  FI. 
 
partnerwahl: 
  kopfzeile ("Phasendiagramm", FALSE); 
  line (2); 
  FOR i FROM 1 UPTO plot param no REP 
    putline (text(i, 3) + " = " + plot param[i].name) 
  PER; 
  REP 
    cursor (1, plot param no +5); 
    put ("X-ACHSE:"); get (no1); 
    cursor (1, plot param no +5); 
    put ("Y-ACHSE:"); get (no2) 
  UNTIL no1 > 0 CAND no1 <= plot param no CAND 
        no2 > 0 CAND no2 <= plot param no CAND 
        no1 <> no2 PER. 
 
werte aus value uebertragen: 
INT CONST erh :: plot param no + 1; 
INT VAR n1 :: no1 + 1, n2 :: no2 + 1; 
 
  FOR i FROM 1 UPTO value no DIV erh REP 
    x[i]:= value[n1]; 
    y[i]:= value[n2]; 
    n1 INCR erh; 
    n2 INCR erh 
  PER. 
 
legende: 
  cursor (1, 23); 
  putline ("X-Achse: " + plot param[no1].name); 
  out     ("Y-Achse: " + plot param[no2].name) 
 
END PROC phasendiagramm; 
 
 
PROC draw picture (INT CONST x, y, xb, yb, schraffur, m, 
                   REAL VAR lower bound, upper bound, 
                   BIG CONST xr, yr): 
 
{ Ausgabe einer Funktionskurve                                         } 
{ Autor: Giffeler GD, 22.04.1988, 27.04.1988                           } 
 
{ x           = X-Position (oben links = 0)                            } 
{ y           = Y-Position (oben links = 0)                            } 
{ xb          = Ausgabebreite                                          } 
{ yb          = Ausgabehöhe                                            } 
{ schraffur   = Linienschraffur (1 - 10)                               } 
{ m           = Anzahl der Funktionswerte                              } 
{ lower bound = Unterer Grenzwert (maxreal wenn Grenze beliebig)       } 
{ upper bound = Oberer Grenzwert (smallreal wenn Grenze beliebig)      } 
{ xr          = Durch SPLINE erzeugte X-Werte                          } 
{ yr          = Durch SPLINE erzeugte Y-Werte                          } 
 
 
ROW 10 INT CONST linienarten :: ROW 10 INT: (-1, -256, 3855, -240, 
                                             21845, -1, -1, -1, -1, -1); 
 
REAL VAR lbx :: maxreal, ubx :: smallreal; 
INT VAR i; 
 
  minimum und maximum fuer x und y berechnen; 
  abmessungsparameter umwandeln; 
  spannweite errechnen; 
  linienschraffur bestimmen; 
  eine funktion ausgeben. 
 
minimum und maximum fuer x und y berechnen: 
  FOR i FROM 1 UPTO m REP 
    lower bound:= min (lower bound, yr[i]); 
    upper bound:= max (upper bound, yr[i]); 
    lbx:= min (lbx, xr[i]); 
    ubx:= max (ubx, xr[i]) 
  PER. 
 
abmessungsparameter umwandeln: 
REAL CONST xpos :: real (x), ypos :: real (y), 
           breite :: real (xb), hoehe :: real (yb). 
 
spannweite errechnen: 
REAL CONST sy :: (upper bound - lower bound) / hoehe, 
           sx :: (ubx - lbx) / breite. 
 
linienschraffur bestimmen: 
  draw linetype (linienarten [abs(schraffur) MOD 10]). 
 
eine funktion ausgeben: 
  move (xpos + (xr[1] - lbx) / sx, 
        ypos + hoehe - (yr[1] - lower bound) / sy); 
  FOR i FROM 2 UPTO m REP 
    drawto (xpos + (xr[i] - lbx) / sx, 
            ypos + hoehe - (yr[i] - lower bound) / sy) 
  PER 
 
END PROC draw picture; 
 
 
PROC koordinatenkreuz (INT CONST nx, ny, breite, hoehe): 
 
  anpassung; 
  rahmen; 
  pfeil oben; 
  pfeil rechts. 
 
anpassung: 
INT CONST x :: nx - 1, 
          y :: ny - 10, 
          b :: breite + 21, 
          h :: hoehe + 11. 
 
rahmen: 
  draw linetype (-1); 
  draw line (x, y, x, y + h); 
  draw to (x + b, y + h). 
 
pfeil oben: 
  draw line (x - 3, y + 4, x, y); 
  draw to (x + 3, y + 4). 
 
pfeil rechts: 
  draw line (x + b - 5, y + h - 2, x + b, y + h); 
  draw to (x + b - 5, y + h + 2) 
 
END PROC koordinatenkreuz; 
 
 
PROC x raster (INT CONST nx, ny, breite, hoehe, anzahl): 
REAL CONST y :: real (ny + hoehe + 2), 
           w :: real (breite) / real (anzahl); 
REAL VAR s :: real (nx); 
INT VAR i; 
 
  FOR i FROM 1 UPTO anzahl REP 
    s INCR w; 
    plot (s, y) 
  PER 
 
END PROC x raster; 
 
 
PROC configurate plot: 
(*
BOOL CONST cmd :: command dialogue; 
INT VAR i; 
 
  command dialogue (TRUE); 
  REP 
    bildschirmausgabe zur auswahl 
  UNTIL (mode nr <= max devices AND mode nr > 0) CAND 
        yes ("Eingabe richtig") PER; 
  command dialogue (cmd). 
 
bildschirmausgabe zur auswahl: 
  page; 
  putline ("CONFIGURATIONSTABELLE DYNAMO GRAFIK"); 
  line (2); 
  FOR i FROM 1 UPTO max devices REP 
    putline (text(i)+" -- "+table[i].bezeichnung) 
  PER; 
  line (2); 
  put ("Modus:"); 
  get (mode nr) 
 
*)
mode nr := 1.     (* CGA *)
END PROC configurate plot; 
 
 
PROC kopfzeile (TEXT CONST message, BOOL CONST grafik): 
 
  IF grafik THEN graphmode (table[mode nr].on) 
  ELSE graphmode (table[mode nr].off) FI; 
  out (""1"");                                     (* C.S. 21.07.88 *) 
  out ("DYNAMO 3.3+"); 
  cursor (79 - LENGTH message, 1); 
  out (message) 
 
END PROC kopfzeile; 
 
 
PROC end of program : 
 
  IF NOT ende CAND (value no DIV (plot param no + 1)) > 2 THEN 
    plot one page 
  FI 
 
END PROC end of program; 
 
 
BOOL PROC stop request: ende END PROC stop request 
 
 
END PACKET dynamo plotter plus