Raster bars: Difference between revisions
m
syntax highlighting fixup automation
m (→{{header|Phix}}: added syntax colouring, made p2js compatible) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 11:
=={{header|Ada}}==
{{libheader|SDLAda}}
<
with SDL.Video.Windows.Makers;
Line 107:
Window.Finalize;
SDL.Finalise;
end Raster_Bars;</
=={{header|Go}}==
Line 122:
</pre>
<
import (
Line 205:
log.Fatal(err2)
}
}</
=={{header|Julia}}==
<
const can = GtkCanvas()
Line 261:
end
end
</syntaxhighlight>
=={{header|Nim}}==
{{trans|Julia}}
{{libheader|gintro}}
<
Line 353:
let app = newApplication(Application, "Rosetta.rasterbars")
discard app.connect("activate", activate)
discard app.run()</
=={{header|Phix}}==
Some grey bars that vaguely shimmer as they march up the screen... (did not turn out quite as well as hoped)
<!--<
<span style="color: #000080;font-style:italic;">-- demo\rosetta\Raster_bars.exw</span>
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
Line 435:
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span>
<!--</
=={{header|Raku}}==
Line 458:
* Press Q to exit.
<syntaxhighlight lang="raku"
Int :b(:$bar-height) is copy = 60; #= Height of the individual "Raster bars", minimum 32 (pixels)
Int :d(:$dir) is copy = -1; #= Scroll direction: -1 is "up" 1 is "down"
Line 657:
}
$fps
}</
Screenshot still of typical run: [https://github.com/thundergnat/rc/blob/master/img/Raster-bars-Perl6.png (offsite .png image)]
Line 664:
=={{header|Rust}}==
<
extern crate minifb;
Line 763:
}
}
</syntaxhighlight>
Line 772:
As DOME has no facility to create an animated .gif file, the moving image is displayed but not saved.
<
import "graphics" for Canvas, Color
Line 859:
}
var Game = RasterBars.new(500, 500)</
|