Jump to content

Greyscale bars/Display: Difference between revisions

m
→‎{{header|Perl 6}}: fixed-size, link to sample output
(Added Go)
m (→‎{{header|Perl 6}}: fixed-size, link to sample output)
Line 1,029:
<pre>$ ocaml graphics.cma greyscale_bars.ml</pre>
=={{header|Perl 6}}==
<lang perl6>my ($wininfowidth,$height) = qx[xwininfo -root]1280,768;
my ($width,$height) = ($wininfo ~~ /'Width: ' (\d+) .*? 'Height: ' (\d+)/).list;
($width,$height) = 1280,768 unless $width;
my $PGM = open "Greyscale-bars-perl6.pgm", :w or die "Can't create Greyscale-bars-perl6.pgm: $!";
Line 1,066 ⟶ 1,064:
@marks Z- 0,|@marks;
}</lang>
[https://github.com/SqrtNegInf/Rosettacode-Perl6-Smoke/blob/master/ref/Greyscale-bars-perl6.png See Greyscale-bars-perl6] (offsite image)
 
=={{header|Phix}}==
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.