RosettaCodeData/Task/Odd-word-problem/XPL0/odd-word-problem.xpl0

34 lines
579 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
proc OWP;
int B;
func Odd;
int S, B;
[S:= ChIn(8);
if S < ^A then \punct\ return S;
B:= Odd;
ChOut(0, S);
return B;
];
[OpenI(8);
loop [loop [B:= ChIn(8);
ChOut(0, B);
if B = ^. then return;
if B < ^A \punct\ then quit;
];
B:= Odd;
ChOut(0, B);
if B = ^. then return;
];
];
[OpenO(8);
Text(8, "what,is,the;meaning,of:life. ");
OWP;
CrLf(0);
OpenO(8);
Text(8, "we,are;not,in,kansas;any,more. ");
OWP;
CrLf(0);
]