RosettaCodeData/Task/Unicode-variable-names/NetRexx/unicode-variable-names.netrexx

34 lines
935 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* NetRexx */
options replace format comments java crossref symbols nobinary
upperΔ = 1
Δupper = upperΔ
lowerδ = 2
δlower = lowerδ
say upperΔ '+' Δupper '= \-'
upperΔ = upperΔ + Δupper
say upperΔ
say lowerδ '+' δlower '= \-'
lowerδ = lowerδ + δlower
say lowerδ
say
-- Unicode works with the NetRexx built-in functions
Υππερ = '\u0391'.sequence('\u03a1') || '\u03a3'.sequence('\u03a9') -- ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
Λοωερ = '\u03b1'.sequence('\u03c1') || '\u03c3'.sequence('\u03c9') -- αβγδεζηθικλμνξοπρστυφχψω
say Υππερ'.Lower =' Υππερ.lower()
say Λοωερ'.Upper =' Λοωερ.upper()
say
-- Note: Even with unicode characters NetRexx variables are case-insensitive
numeric digits 12
δ = 20.0
π = Math.PI
θ = Π * Δ
σ = Θ ** 2 / (Π * 4) -- == Π * (Δ / 2) ** 2
say 'Π =' π', diameter =' δ', circumference =' Θ', area =' Σ
return