<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Redim with function name"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=85371#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Redim with function name"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=85371">bug 85371</a>
              from <span class="vcard"><a class="email" href="mailto:himajin100000@gmail.com" title="himajin100000@gmail.com">himajin100000@gmail.com</a>
</span></b>
        <pre>Just a guess:

As I pointed out in <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Basic IDE: watching of variable not working if variable is returning value of function"
   href="show_bug.cgi?id=57308">tdf#57308</a>, SbMethod is silently added to refParams at index
0.

This method basically has the flag SbxFlagBits::Read only, so we cannot write
to this variable.

<a href="https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=889dc7bf#502">https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=889dc7bf#502</a>

However, if the variable is used in a function(pMeth) with the same name as the
variable, the variable will be given a SbxFlagBits::Write.

<a href="https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#1651">https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#1651</a>

and the flag will be restored later in StepPUT.

On the other hand if the variable is used in StepINITFOR,StepNext

<a href="https://opengrok.libreoffice.org/xref/core/basic/source/comp/loops.cxx?r=ab9b67bb#238">https://opengrok.libreoffice.org/xref/core/basic/source/comp/loops.cxx?r=ab9b67bb#238</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/inc/opcodes.hxx?r=abe5a1a5#28">https://opengrok.libreoffice.org/xref/core/basic/source/inc/opcodes.hxx?r=abe5a1a5#28</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#763">https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#763</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#StepINITFOR">https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#StepINITFOR</a>
<a href="https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#2546">https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=889dc7bf#2546</a>

SbxFlagBits::Write is not set to this variable. I guess this is the cause.</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>