Old Russian measure of length: Difference between revisions

(Added Algol 68)
Line 2,470:
</pre>
 
=={{header|RPL}}==
{{works with|Halcyon Calc|4.2.7}}
≪ { "arshin" 0.7112 "centimeter" 0.01 "diuym" 0.0254 "fut" 0.3048 "kilometer" 1000 "liniya" 0.00254 "meter" 1
"milia" 7467.6 "piad" 0.1778 "sazhen" 2.1336 "tochka" 0.000254 "vershok" 0.04445 "versta" 1066.8 }
→ value unit table
≪ '''IF''' table unit POS
'''THEN'''
LAST 1 + table SWAP GET value * → meters
≪ 1 table SIZE '''FOR''' j
meters table j 1 + GET / →STR " " + table j GET + "s" +
2 '''STEP'''
'''ELSE''' value unit ": unknown unit" +
'''END'''
≫ ≫
'OLDRU' STO
 
3.14 "fut" OLDRU
{{out}}
<pre>
13: "1.34571428571 arshins"
12: "95.7072 centimeters"
11: "37.68 diuyms""37.68 diuyms"
10: "3.14 futs"
9: "0.000957072 kilometers"
8: "376.8 liniyas"
7: "0.957072 meters"
6: "1.28163265306E-04 milias"
5: "5.38285714286 piads"
4: "0.448571428571 sazhens"
3: "3768 tochkas"
2: "21.5314285714 vershoks"
1: "8.97142857143E-04 verstas"
</pre>
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">module Distances
1,151

edits