Odd word problem: Difference between revisions
Content added Content deleted
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
(Added XPL0 example.) |
||
Line 2,979: | Line 2,979: | ||
we,era;not,ni,kansas;yna,more. |
we,era;not,ni,kansas;yna,more. |
||
</pre> |
|||
=={{header|XPL0}}== |
|||
{{trans|Go}} |
|||
<syntaxhighlight lang "XPL0">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); |
|||
]</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
what,si,the;gninaem,of:efil. |
|||
we,era;not,ni,kansas;yna,more. |
|||
</pre> |
</pre> |
||