home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------ */
- /* CONDEMO.C */
- /* Beispielprogramm für die Funktionen aus CONIO2.C */
- /* (c) 1989 Michael Rother & TOOLBOX */
- /* ------------------------------------------------------ */
- #include <stdio.h>
- #include "conio2.h"
-
- void testbild(void)
- {
- int i;
- for (i=1;i<=24;i++) {
- gotoxy(1,i);
- printf("1234567890 20 30 40"\
- " 50 60 70 80");
- } /* jeweils 9 Leerzeichen zwischen den Zahlen */
- getch();
- }
-
- void main(void)
- {
- short i, x, y;
-
- testbild();
- clrscr();
- printf("Bildschirm gelöscht mit 'clrscr()'.\n");
- getch();
- testbild();
- gotoxy(1,10);
- puts("Nun hier mit 'gotoxy(1,10)'.\n");
- getch();
- gotoxy(50,12);
- puts("Nun hier mit 'gotoxy(50,12)'.\n");
- getch();
- clrscr();
- testbild();
- gotoxy(5,10);
- clreol();
- gotoxy(5,11);
- printf("'clreol()' ab Spalte 5.");
- getch();
- gotoxy(50,14);
- clreol();
- gotoxy(50,15);
- printf("'clreol()' ab Spalte 50.");
- getch();
- clrscr();
- for (i=1; i<=24; i++) {
- gotoxy(1, i);
- printf("Zeile %d ist hier zu sehen", i);
- }
- getch();
- gotoxy(1,12);
- delline();
- gotoxy(1,25);
- printf("Die Zeile 2 wurde mit 'delline()' entfernt.");
- getch();
- gotoxy(1,25);
- insline();
- printf("Eine neue Zeile 2 wurde mit");
- printf("'insline()' eingefügt.");
- getch();
- clrscr();
- gotoxy(10,10);
- x = wherex();
- y = wherey();
- printf("Es wurde soeben 'gotoxy(10,10)'");
- printf(";aufgerufen und abgefragt.");
- gotoxy(1,24);
- printf("Der Wert von x war %d und von y war es %d.",x,y);
- getch();
- }
- /* ------------------------------------------------------ */
- /* Ende von CONDEMO.C */
-