<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Hex value gives negative long / single / double number"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=131241#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Hex value gives negative long / single / double number"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=131241">bug 131241</a>
              from <span class="vcard"><a class="email" href="mailto:sng@hellug.gr" title="Spiros Georgaras <sng@hellug.gr>"> <span class="fn">Spiros Georgaras</span></a>
</span></b>
        <pre>This is probably due to
<a href="https://wiki.documentfoundation.org/ReleaseNotes/6.4#BASIC">https://wiki.documentfoundation.org/ReleaseNotes/6.4#BASIC</a>

Macros: When converting Hex strings of negative value, treat the high-order bit
always as sign bit, e.g., &H8000 = -2^15, &HFFFF = -1, and &H7FFFFFFF = 2^31-1.
Behaviour is identical in either modes, i.e., LibO Basic, with Option
Compatible, and Option VBA Support 0/1. <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Instruction Cint fails when converting Hex strings of a negative value to a 16-bit integer value."
   href="show_bug.cgi?id=62326">tdf#62326</a> (Andreas Heinisch)

So, this is not a bug, but the only way to get around it is to use

aLong = CLng("&HFFE0")</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>