Map range: Difference between revisions
Content deleted Content added
→{{header|C}}: Maked incorrect. C++ has right output, for example. |
→{{header|Ada}}: fix wrong example used |
||
Line 9:
=={{header|Ada}}==
<lang Ada>with Ada.Text_IO;
procedure Map is
type First_Range is new Float range
type Second_Range is new Float range -1.0 .. 0.0;
function Translate (Value : First_Range) return Second_Range is
Line 45:
Output:
<pre>
9.00000E+00 maps to: -1.00000E-01
1.00000E+01 maps to: 0.00000E+00</pre>
|