|
LOOP Write.String("address book> "); Read.Line(command); IF Streams.stdin.count = 0 THEN EXIT END; IF command = "quit" THEN EXIT END; IF command = "new" THEN (* fill new entry *) ELSIF command = "list" THEN (* list all entries *) ELSIF command = "search" THEN (* search for an entry by a name *) ELSIF command = "delete" THEN (* delete an entry with the given name *) ELSIF command = "help" THEN (* print help information *) ELSE Write.Line("Unknown command. Please try ``help''!"); END; END; |
Read.Line liest eine vollständige Zeile ein
und legt den Zeileninhalt (soweit es geht) ohne den
Zeilentrenner in dem übergebenen Array ab.
| |
Die CASE-Anweisung ist nicht für Zeichenketten
zulässig. Entsprechend muß ersatzweise eine ELSIF-Kette
verwendet werden.
|
Copyright © 2004, 2005 Andreas Borchert, in HTML konvertiert am 18.02.2005 |