home *** CD-ROM | disk | FTP | other *** search
- PROGRAM Graphenauswertung;
-
- { ----------------------------------------------------------------- }
- { Dieses Programm wertet eine ASCII Datei aus, in welcher die }
- { Wertetabelle einer Funktion steht. Diese Wertetabelle muss }
- { vorher durch ein anderes Programm erzeugt werden. }
- { - Sprache : TURBO-Pascal Vers. 4.0 (3.0) }
- { - Copyright (c) 1989 Heinz Hagemeyer & TOOLBOX }
- { }
- { ----------------------------------------------------------------- }
-
- USES Crt,Graph, { Einbinden der benötigten Units von Turbo 4.0 }
- pgraph; { und aus Databox 12/88 (leicht geändert) }
-
- {$I GraphDef.PAS Konstanten, Typen und Variablen }
- {$I GraphUt.PAS Proceduren und Funktionen }
-
- { ----------------------------------------------------------------- }
-
- BEGIN { Main }
- { Vorbesetzen der Variblen auf Standartwerte, ist ggf. zu ändern }
-
- x1 := -4; x2 := 4; y1 := -3; y2 := 3; xBez := 'x'; yBez := 'y';
- c := 'N';
-
- { Falls Dateinamen beim Aufruf mit übergeben wurden }
-
- DateiAnzahl := ParamCount;
- IF DateiAnzahl > MaxDateiAnzahl THEN DateiAnzahl := MaxDateiAnzahl;
- FOR i := 1 TO DateiAnzahl DO Datei_Name [i] := ParamStr (i) ;
-
- REPEAT
- Einschaltmeldung;
- DateiEingabe (DateiAnzahl);
- WaehleKoordsys (x1,x2,y1,y2,xBez,yBez);
-
- { Ab hier geht's mit Grafik weiter }
-
- IF c = 'N' THEN OpenGraphik
- ELSE SetGraphMode (GraphMode);
-
- { Überschrift }
-
- SetTextJustify (LeftText,TopText);
- SetTextStyle (3,0,2);
- OuttextXY (300,0,'Wertetabellen darstellen');
- OutTextXY (0,0,'Datei :');
-
- Koordinatensystem (x1,x2,y1,y2,xBez,yBez);
- KordViewPort;
-
- FOR DateiNr := 1 TO DateiAnzahl DO
- Zeichne_Graph (DateiNr);
-
- { Fertig, Abfrage noch einmal ? }
-
- SetViewPort (0,GetMaxY-10,GetMaxX,GetMaxY,ClipOn);
- SetTextStyle (0,0,1); SetTextJustify (LeftText,TopText);
- OuttextXY (0,0,'Noch einmal (J/N) : '); Write (#07);
-
- REPEAT
- c := UpCase (ReadKey);
- UNTIL (c = 'J') OR (c = 'N');
- IF c = 'J' THEN
- BEGIN
- RestoreCRTMode;
- Window (1,1,80,25);
- END;
- UNTIL c = 'N';
- CloseGraphik ;
- END.