<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 22 Feb 2013, at 13:30, <a href="mailto:tomek@ump.edu.pl">tomek@ump.edu.pl</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">s1,s2: extended;<br><br>s1:=291.022;<br>s2:=roundto(s1,-30);   //TRoundToRange = -37..37;<br><br>give me Invalid floating point operation.<br><br>I see that roundto goes to single instead of extended. But why ?<br></span></span></blockquote></div><br><div>Because overload selection is based on parameter matching from right to left, and -30 can be exactly represented using "single" and hence is converted to that type by the compiler when it has to turn it into a floating point constant.</div><div><br></div><div><br></div><div>Jonas</div></body></html>