Vibrating rectangles: Difference between revisions

Added XPL0 example.
(Added XPL0 example.)
Line 934:
 
[https://1drv.ms/v/s!AqDUIunCqVnIg1MxKPi5DzwUbJEf Vibrating rectangles]
 
=={{header|XPL0}}==
Translation of EasyLang.
<lang XPL0>int Sz, Color;
 
proc OnTimer;
[Sz:= Sz - 2;
if Sz < 0 then
[Sz:= 49;
Color:= Ran(256);
];
Move(50-Sz, 50-Sz);
Line(50+Sz, 50-Sz, Color);
Line(50+Sz, 50+Sz, Color);
Line(50-Sz, 50+Sz, Color);
Line(50-Sz, 50-Sz, Color);
];
 
[SetVid($13); \set video to VGA 320x200 in 256 colors
Sz:= 0;
repeat DelayUS(200_000);
OnTimer;
until KeyHit;
]</lang>
772

edits