Anonymous user
Galton box animation: Difference between revisions
→{{header|REXX}}: added a prompt so the user knows what to do when the simulation is frozen on a specific step.
(→{{header|REXX}}: added boilerplate code to know that the program's name is, and also to know which program to use to clear the terminal screen.) |
(→{{header|REXX}}: added a prompt so the user knows what to do when the simulation is frozen on a specific step.) |
||
Line 2,944:
!sys: !cms= !sys=='CMS'; !os2= !sys=='OS2'; !tso= !sys=='TSO' | !sys=='MVS'; !vse= !sys=='VSE'; !dos= pos('DOS', !sys)\==0 | pos('WIN', !sys)\==0 | !sys=='CMD'; !crx= left(!sys, 6)=='DOSCRX'; call !rex; return
!var: call !fid; if !kexx then return space( dosenv( arg(1) ) ); return space( value( arg(1), , !env) )</lang>
Programming note: the last seven lines of this REXX program are some general purpose (boilerplate code) that, among other things, finds:
::* the REXX program's filename, filetype (file extension), and filemode (and/or path)
::* if the user wants documentation presented (not germane to this REXX program)
::* the environment name (not germane)
::* what command to be used to clear the terminal screen
::* the name of the operating system being used (not germane)
::* the name of the REXX interpreter being used (not germane)
::* various other bits of information (not germane)
It is only intended to be used to make this particular REXX program independent of any particular REXX interpreter and/or independent of knowing which program is to be used for clearing the terminal screen. As such, the boilerplate code isn't commented and isn't intended to be a teaching tool.
This REXX program makes use of '''SCRSIZE''' REXX program (or
BIF) which is used to determine the screen
Line 3,014 ⟶ 3,025:
☼ ☼ ☼ ☼ ☼ ☼ ☼
☼ ☼ ☼ ☼ ☼ ☼ ☼ ☼ ☼
press ENTER ···
</pre>
{{out|output|text= when using the above inputs; this is the final screenshot:}}
|