Source Code PIPEDOS.BAS

01' **********************************************************/
02' **********************************************************/
03' ***                                                    ***/
04' ***  Program name: PIPEDOS.BAS                         ***/
05' ***                                                    ***/
06' ***  Created     : 05/10/90                            ***/
07' ***                                                    ***/
08' ***  Revised     :                                     ***/
09' ***                                                    ***/
10' ***  Author      : Tim Sennitt                         ***/
11' ***                                                    ***/
12' ***  Purpose     : To demonstrate the use of a named   ***/
13' ***                pipe to communicate to an OS/2      ***/
14' ***                session.                            ***/
15' ***  Compile     : none                                ***/
16' ***                                                    ***/
17' ***  Input param : none                                ***/
18' ***                                                    ***/
22' **********************************************************/
23' **********************************************************/
30 CLS:KEY OFF
40 COLOR 7,0
50 OPEN "r",1,"\PIPE\TIMSP",1
60 FIELD 1,1 AS A$
70 GET 1
80 IF A$="B" OR A$="b" THEN BKGRND =  9:GOTO 90   ' Blue
81 IF A$="C" OR A$="c" THEN BKGRND =  3:GOTO 90   ' Cyan
82 IF A$="G" OR A$="g" THEN BKGRND = 10:GOTO 90   ' Green
83 IF A$="P" OR A$="p" THEN BKGRND =  5:GOTO 90   ' Purple
84 IF A$="R" OR A$="r" THEN BKGRND = 12:GOTO 90   ' Red
85 IF A$="W" OR A$="w" THEN BKGRND =  7:GOTO 90   ' White
86 IF A$="Y" OR A$="y" THEN BKGRND =  6:GOTO 90   ' Yellow
87 IF A$="Q" OR A$="q" THEN SYSTEM                ' exit system
90 COLOR 0,BKGRND:CLS:GOTO 70


[Back: Expected Results]
[Next: Source Code PIPEOS2.C]