<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ez ugyan már nem konkrét technológiai gondolatsor, hiszen a szabvány megmondja, hogy mi van és pofa be, de a ternary operátor nyugodtan visszaadhatna egy Number objektumot is, ami lehet hol Double, hol meg Long. Ahogy a metódus is ezt teszi, ha átírom jól.<div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: 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="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="color: rgb(136, 136, 136); ">--</span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "><br></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); ">Verhás Péter</span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "><br></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "><a href="mailto:peter@verhas.com">peter@verhas.com</a></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "><br></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); ">+36(30)9306805</span><span class="Apple-style-span" style="color: rgb(136, 136, 136); "><br></span><span class="Apple-style-span" style="color: rgb(136, 136, 136); ">skype: verhas</span></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On 2012.07.21., at 19:24, Richard O. Legendi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-2" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">Csak amíg ott ez érthető és indokoltnak
      tűnik, addig itt miért így kellett?</blockquote>
    <br>
    Azért, mert megtévesztően a trenary operátor valójában egy érték
    típusú kifejezés (<i>conditional expression, </i>ahogy a neve is
    mutatja), ezért ebből a szempontból pontosan ugyanúgy viselkedik,
    mint egy sima összeadás.<br>
    <br>
    Ricsi<br>
    <br>
    <div class="moz-cite-prefix">On 2012.07.21. 18:25, Peter Verhas
      wrote:<br>
    </div>
    <blockquote cite="mid:680D67B5-E0FC-4546-A2E2-D776A7F5506F@verhas.com" type="cite">Valóban azt írja a szabvány, hogy típuskonverziót fog
      végezni, és az eredmény pontosan ugyanúgy Double lesz, mint ahogy
      egy Long és egy Double összeadása során is Double-t kapunk. Csak
      amíg ott ez érthető és indokoltnak tűnik, addig itt miért így
      kellett? Nah, de mindegy. Lényeg, hogy ez nem bug, hanem feature.
      </blockquote></div></blockquote></div><br></div></body></html>