Pinstripe/Display: Difference between revisions
Content added Content deleted
m (→{{header|Quackery}}: fast graphics) |
(add lambdatalk code) |
||
Line 886: | Line 886: | ||
} |
} |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|Lambdatalk}}== |
|||
Using HTML+CSS |
|||
<syntaxhighlight lang="scheme"> |
|||
{def window |
|||
{lambda {:w :h} |
|||
div |
|||
{@ style="position:relative; |
|||
top:0; left:0; |
|||
width::wpx; height::hpx; |
|||
background:#eee;"}}} |
|||
-> window |
|||
{def rec |
|||
{lambda {:x :y :w :h :c} |
|||
{div |
|||
{@ style="position:absolute; |
|||
top::ypx; left::xpx; |
|||
width::wpx; height::hpx; |
|||
background::c;"}}}} |
|||
-> rec |
|||
{def row |
|||
{lambda {:w :h :k} |
|||
{S.map {{lambda {:dx :dy :h :i} |
|||
{rec :i :dy :dx :h #000} |
|||
{rec {+ :i :dx} :dy :dx :h #fff} |
|||
} {pow 2 :k} {* :k {/ :w 8}} {/ :h 4}} |
|||
{S.serie 0 {- :w 1} {pow 2 {+ :k 1}}}}}} |
|||
-> row |
|||
{def WIDTH 512} |
|||
-> WIDTH |
|||
{def HEIGHT 256} |
|||
-> HEIGHT |
|||
{{window {WIDTH} {WIDTH}} |
|||
{S.map {row {WIDTH} {HEIGHT}} |
|||
0 1 2 3}} |
|||
</syntaxhighlight> |
|||
Output visible in http://lambdaway.free.fr/lambdawalks/?view=color_bar_display |
|||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |