Implicit type conversion: Difference between revisions

m
→‎{{header|REXX}}: reformatted the comment box.
m (→‎{{header|REXX}}: added an output section.)
m (→‎{{header|REXX}}: reformatted the comment box.)
Line 829:
=={{header|REXX}}==
<pre>
╔═══════════════════════════════════════════════════════════════════════════════════╗
╔══════════════════════════════════════════════════════════════════════╗
║ The REXX language has conversion, if normalization can be regarded as a type of
as a type of conversion. Normalization can remove all blanks from (numeric) literals, leading
(numeric) literals, leading plus (+) signs, the decimal point (if it's not significant), and leading and/or
║ trailing zeroes (except for zero itself), remove insignificant leading zeroes in ║
║ it's not significant, and leading and/or trailing zero (except for ║
zero,the of course)exponent, removeadd insignificanta leadingplus zeroessign in(+) thefor any positive exponent, and will capitalize
the "e" in an exponentiated number.
║ exponent, add a plus sign (+) for any positive exponent, and will ║
capitalize the "e" in an exponentiated number.
║ Almost all numerical expressions can be normalized after computation, shown below ║
║ ║
Almostare alla numericalfew examples. Other expressions canwith non-numeric values are treated as be normalized after computation,
simple literals.
║ below are a few examples. Other expressions with non-numeric values ║
are treated as simple literals.
║ Note that REXX can store the number with leading signs, leading, trailing, and ║
║ ║
Notesometimes thatimbedded REXXblanks (which can storeonly theoccur numberafter witha leading signs,sign). leading,
quotes or apostrophes).
║ trailing, and sometimes imbedded blanks (which can only occur after ║
║ Also noted is how numbers can be assigned using quotes ['] or apostrophes ["]. ║
║ a leading sign). Also noteworthy is how one assigns numbers (using ║
╚═══════════════════════════════════════════════════════════════════════════════════╝
║ quotes or apostrophes). ║
╚══════════════════════════════════════════════════════════════════════╝
</pre>
<lang rexx>/*REXX program demonstrates various ways REXX can convert and/or normalize some numbers.*/