Re: Indirection

Jean-Luc Arnaud <jean-luc-E/[email protected]> Wed, 16 Jan 2019 14:23:09 +0100
Newsgroups gmane.comp.lang.realbasic.user
Organization Centre Direct du Multimédia
Message-ID <[email protected]>
--------------6242735167F17B93AB576597
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Thanks for replying, Jon.

Jean-Luc Arnaud

Le 16/01/2019 à 13:55, Jon Ogden a écrit :
> Probably because there are not too many of us left here any more, 
> unfortunately. I know I didn’t know the answer to your question. 
> Delegates might work. There’s a bit of work to set them up but they 
> are quite useful. I haven’t used them too much as they still tend to 
> confuse me a bit. I use them in places where I want to be able to 
> easily change an event handler without having to use the Add/Remove 
> Handler directive multiple times.
>
>
> Sent from my iPhone
>
> On Jan 16, 2019, at 4:48 AM, Jean-Luc Arnaud <jean-luc-E/[email protected] 
> <mailto:jean-luc-E/[email protected]>> wrote:
>
>> Hi,
>>
>> On the 7th of December, I sent the below message, and got no reply.
>>
>> After seeking in Language Reference, forum and Internet, I think 
>> Delegate could be a solution.
>> What's your opinion?
>>
>> TIA for any help.
>> -- 
>> Jean-Luc Arnaud
>>
>> -------------------------
>>
>> Hi all,
>> Is there a way to use a kind of indirection, just like Dynamic 
>> strings and #, but for other type of variable, in particular with 
>> arrays?
>> Let say I have 3 arrays named "MyArray1", "MyArray2" and "MyArray3".
>> I need to use them with indirection, something like:
>>
>>     Dim Name1 As String="MyArray1"
>>     Dim Name2 As String="MyArray2"
>>     Dim Name3 As String="MyArray3"
>>     If Value=1
>>         Result=#Name1(0)
>>     End If
>>
>>
>> TIA for any help
>>
>> -- Jean-Luc Arnaud


--------------6242735167F17B93AB576597
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks for replying, Jon.<br>
    <pre class="moz-signature" cols="72">Jean-Luc Arnaud

</pre>
    <div class="moz-cite-prefix">Le 16/01/2019 à 13:55, Jon Ogden a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:6A1FEFB8-80DC-4568-BA71-0A2119DF5C86-ee4meeAH724@public.gmane.org">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Probably because there are not too many of us left here any more,
      unfortunately. I know I didn’t know the answer to your question.
      Delegates might work. There’s a bit of work to set them up but
      they are quite useful. I haven’t used them too much as they still
      tend to confuse me a bit. I use them in places where I want to be
      able to easily change an event handler without having to use the
      Add/Remove Handler directive multiple times. 
      <div><br>
        <br>
        <div id="AppleMailSignature" dir="ltr">Sent from my iPhone</div>
        <div dir="ltr"><br>
          On Jan 16, 2019, at 4:48 AM, Jean-Luc Arnaud &lt;<a
            href="mailto:jean-luc-E/[email protected]"
            moz-do-not-send="true">jean-luc-E/[email protected]</a>&gt;
          wrote:<br>
          <br>
        </div>
        <blockquote type="cite">
          <div dir="ltr">
            <meta http-equiv="content-type" content="text/html;
              charset=UTF-8">
            Hi,<br>
            <br>
            On the 7th of December, I sent the below message, and got no
            reply.<br>
            <br>
            After seeking in Language Reference, forum and Internet, I
            think Delegate could be a solution.<br>
            What's your opinion?<br>
            <br>
            TIA for any help.<br>
            <pre class="moz-signature" cols="72">-- 
Jean-Luc Arnaud

-------------------------

</pre>
            <div class="moz-text-flowed" style="font-family: -moz-fixed;
              font-size: 12px;" lang="x-unicode">Hi all, <br>
              Is there a way to use a kind of indirection, just like
              Dynamic strings and #, but for other type of variable, in
              particular with arrays? <br>
              Let say I have 3 arrays named "MyArray1", "MyArray2" and
              "MyArray3". <br>
              I need to use them with indirection, something like: <br>
              <br>
                  Dim Name1 As String="MyArray1" <br>
                  Dim Name2 As String="MyArray2" <br>
                  Dim Name3 As String="MyArray3" <br>
                  If Value=1 <br>
                      Result=#Name1(0) <br>
                  End If <br>
              <br>
              <br>
              TIA for any help <br>
              <br>
              -- Jean-Luc Arnaud <br>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------6242735167F17B93AB576597--