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: &nbsp; the last seven lines of this REXX program are some general purpose (boilerplate code) that, among other things, finds:
::* &nbsp; the REXX program's filename, filetype (file extension), and filemode (and/or path)
::* &nbsp; if the user wants documentation presented (not germane to this REXX program)
::* &nbsp; the environment name (not germane)
::* &nbsp; what command to be used to clear the terminal screen
::* &nbsp; the name of the operating system being used (not germane)
::* &nbsp; the name of the REXX interpreter being used (not germane)
::* &nbsp; 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. &nbsp; As such, the boilerplate code isn't commented and isn't intended to be a teaching tool.
 
This REXX program makes use of &nbsp; '''SCRSIZE''' &nbsp; REXX program (or
BIF) which is used to determine the screen
Line 3,014 ⟶ 3,025:
☼ ☼ ☼ ☼ ☼ ☼ ☼
☼ ☼ ☼ ☼ ☼ ☼ ☼ ☼ ☼
press ENTER ···
</pre>
{{out|output|text=&nbsp; when using the above inputs; &nbsp; this is the final screenshot:}}