Dutch national flag problem: Difference between revisions

Content added Content deleted
(Added XPL0 example.)
m (→‎{{header|XPL0}}: Keep constant constant.)
Line 4,107: Line 4,107:


proc Part3Ways; \Partition array A three ways (code from Wikipedia)
proc Part3Ways; \Partition array A three ways (code from Wikipedia)
int Mid, I, J, K, T;
def Mid = White;
[Mid:= White; I:= 0; J:= 0; K:= Size-1;
int I, J, K, T;
[I:= 0; J:= 0; K:= Size-1;
while J <= K do
while J <= K do
if A(J) < Mid then
if A(J) < Mid then