Old Russian measure of length: Difference between revisions

Content deleted Content added
m →‎{{header|REXX}}: added a comment about columnarized output instead of horizontal stream.
m →‎{{header|REXX}}: changed method of capitalizing a variable. -- ~~~~
Line 39: Line 39:
n=n/1 /*normalize it (004──►4 7.──►7)*/
n=n/1 /*normalize it (004──►4 7.──►7)*/
if what=='' then what='meters' /*None specified? Assume meters.*/
if what=='' then what='meters' /*None specified? Assume meters.*/
parse upper what whatU /*an uppercase version for ABBREV*/
whatU=what; upper whatU /*an uppercase version for ABBREV*/
select /*convert the length ───► meters.*/
select /*convert the length ───► meters.*/
when abbrev('METERS' ,whatU ) then m=N
when abbrev('METERS' ,whatU ) then m=N
when abbrev('VERSHOKS',whatU,2) then m=N / vershoks
when abbrev('VERSHOKS',whatU,2) then m=N/vershoks
when abbrev('ARSHINS' ,whatU ) then m=N / arshins
when abbrev('ARSHINS' ,whatU ) then m=N/arshins
when abbrev('SAZHENS' ,whatU ) then m=N / sazhens
when abbrev('SAZHENS' ,whatU ) then m=N/sazhens
when abbrev('VERSTS' ,whatU,2) then m=N / versts
when abbrev('VERSTS' ,whatU,2) then m=N/versts
otherwise call err 'invalid measure name: ' what
otherwise call err 'invalid measure name: ' what
end /*select*/
end /*select*/
say n what ' is:'
say n what ' is:'
; if m\=N then say right(m,40) 'meter's(m)
; if m\=N then say right(m,40) 'meter's(m)