Bitmap/Histogram: Difference between revisions

m
→‎{{header|Forth}}: add a working GnuForth 0.7.x version →‎{{header|GnuForth 0.7}}
m (Automated syntax highlighting fixup (second round - minor fixes))
m (→‎{{header|Forth}}: add a working GnuForth 0.7.x version →‎{{header|GnuForth 0.7}})
Line 515:
dup bdim * over bdata + swap bdata
do 1 over i c@ cells + +! loop drop ;</syntaxhighlight>
\ will not work as far as bdim bdata are not ans forth words
\ do not forget to assign them yourself in your code
 
=={{header|GnuForth 0.7}}==
<syntaxhighlight lang="forth">
: bar ( v y x -- )
2dup at-xy .\" [" 100 spaces .\" ]" swap 1 + swap at-xy 0
DO .\" #"
LOOP
cr ;
: demo \ just demo to show it working in percentage 1% to 4%
5 1
DO i 10 i bar
LOOP
cr ;
\ will display :
[# ]
[## ]
[### ]
[#### ]
</syntaxhighlight>
 
=={{header|Fortran}}==
{{works with|Fortran|90 and later}}
2

edits