<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Format Basic function needs better description of its 'format' argument"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=143183#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Format Basic function needs better description of its 'format' argument"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=143183">bug 143183</a>
              from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
        <pre>(In reply to Olivier Hallot from <a href="show_bug.cgi?id=143183#c3">comment #3</a>)
<span class="quote">> Also the "&" format code seems to return the format string itself.
> msgbox Format("ADCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", "&abc")
> msgbox Format(123.456, "&abc")
> msgbox Format("123.456", "&abc")

> all return &abc.</span >

No, the first one returns "ADCDEFGHIJKLMNOPQRSTUVWXYZ1234567890" - the handling
of "&" in printfmtstr is the same as treatment of everything else ("default"
clause in the switch), with the only difference of also modifying position of
the pFmt, which is only used for return value of the function ("the number of
characters used from the format"), which is in fact unused in the only place
where the function is called - hence I didn't mention the "&" in <a href="show_bug.cgi?id=143183#c2">comment 2</a>.

When the string may be converted to number, it is handled as a number, using
different rules.

In general, I suppose we need to drop this "printfmtstr" idiocy, as I suggested
in <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Clean up Basic 'Format' implementation"
   href="show_bug.cgi?id=143193">tdf#143193</a>.</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>