Old Russian measure of length: Difference between revisions

Content added Content deleted
(→‎{{header|Java}}: added Java)
m (→‎{{header|REXX}}: added a link to the LINESIZE.REX program.)
Line 424: Line 424:
=={{header|REXX}}==
=={{header|REXX}}==
Program features:
Program features:
* shows all ''other'' units of measurements when any unit is specified.
::* shows all ''other'' units of measurements when any unit is specified.
* accepts abbreviations of the length units
::* accepts abbreviations of the length units
* does rounding for so results are more meaningful and recognizable
::* does rounding for so results are more meaningful and recognizable
* does error checking on the user input
::* does error checking on the user input
* added other old Russian units of measurements
::* added other old Russian units of measurements
* uses the correct length unit names when not plural
::* uses the correct length unit names when not plural
* columnarized the output   (instead of a horizontal stream).
::* columnarized the output   (instead of a horizontal stream).
<lang rexx>/*REXX program to read a config file and assign VARs as found within. */
<lang rexx>/*REXX program to read a config file and assign VARs as found within. */
numeric digits 200
numeric digits 200
Line 501: Line 501:
saym: parse arg _; numeric digits digits()%25; _=_/1
saym: parse arg _; numeric digits digits()%25; _=_/1
say right(_,40) arg(2)s(_); return</lang>
say right(_,40) arg(2)s(_); return</lang>
This REXX program makes use of &nbsp; '''LINESIZE''' &nbsp; REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console).
<br>The &nbsp; '''LINESIZE.REX''' &nbsp; REXX program is included here ──► [[LINESIZE.REX]].<br>

'''output''' when using the input of: <tt> 100 metres </tt>
'''output''' when using the input of: <tt> 100 metres </tt>
<pre>
<pre style="overflow:scroll">
────────────────────────────────────metric─────────────────────────────────────
────────────────────────────────────metric─────────────────────────────────────
0.1 kilometers
0.1 kilometers