Colour bars/Display: Difference between revisions
Content added Content deleted
(Added Julia language) |
No edit summary |
||
Line 819: | Line 819: | ||
ColorFrame(400, 400) |
ColorFrame(400, 400) |
||
}</lang> |
}</lang> |
||
Editing Babbage problem |
|||
=={{header|M2000 Interpreter}}== |
|||
Calling a module can be done by using name or call name. The later used for recursive call. Here we use it for beautify the code. |
|||
<lang M2000 Interpreter> |
|||
Module Checkit { |
|||
Module Bars { |
|||
barwidth=x.twips div 8 |
|||
barheight=y.twips |
|||
barcolors=(0,#ff0000,#00ff00, #0000ff, #FF00FF, #00ffff, #ffff00, #ffffff) |
|||
For i=0 to 7 |
|||
Move i*barwidth, 0 |
|||
\\ gradient fill. Here second color are the same as first color |
|||
Fill barwidth, barheight, array(barcolors, i), array(barcolors, i) |
|||
Next i |
|||
} |
|||
\\ first draw on console |
|||
Call Bars |
|||
Declare Form1 Form |
|||
Layer Form1 { |
|||
window 12, 10000,8000; |
|||
\\ now draw on Form1 layer, above console, in a window |
|||
Call Bars |
|||
} |
|||
Method Form1, "Show", 1 ' open modal |
|||
Declare Form1 Nothing |
|||
} |
|||
Checkit |
|||
</lang> |
|||
=={{header|Maple}}== |
=={{header|Maple}}== |