Re: Indirection

Jon Ogden <[email protected]> Wed, 16 Jan 2019 07:34:10 -0600
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
--Apple-Mail-8D6A1B47-EC02-4C26-9D4A-842C7F56826A
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

As much as I like the NUG, you may get better results in the forums.=20

Sent from my iPhone

> On Jan 16, 2019, at 7:23 AM, Jean-Luc Arnaud <jean-luc-E/[email protected]> wr=
ote:
>=20
> Thanks for replying, Jon.
> Jean-Luc Arnaud
>=20
>> Le 16/01/2019 =C3=A0 13:55, Jon Ogden a =C3=A9crit :
>> Probably because there are not too many of us left here any more, unfortu=
nately. I know I didn=E2=80=99t know the answer to your question. Delegates m=
ight work. There=E2=80=99s a bit of work to set them up but they are quite u=
seful. I haven=E2=80=99t 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 eve=
nt handler without having to use the Add/Remove Handler directive multiple t=
imes.=20
>>=20
>>=20
>> Sent from my iPhone
>>=20
>> On Jan 16, 2019, at 4:48 AM, Jean-Luc Arnaud <jean-luc-E/[email protected]> w=
rote:
>>=20
>>> Hi,
>>>=20
>>> On the 7th of December, I sent the below message, and got no reply.
>>>=20
>>> After seeking in Language Reference, forum and Internet, I think Delegat=
e could be a solution.
>>> What's your opinion?
>>>=20
>>> TIA for any help.
>>> --=20
>>> Jean-Luc Arnaud
>>>=20
>>> -------------------------
>>>=20
>>> Hi all,=20
>>> Is there a way to use a kind of indirection, just like Dynamic strings a=
nd #, but for other type of variable, in particular with arrays?=20
>>> Let say I have 3 arrays named "MyArray1", "MyArray2" and "MyArray3".=20
>>> I need to use them with indirection, something like:=20
>>>=20
>>>     Dim Name1 As String=3D"MyArray1"=20
>>>     Dim Name2 As String=3D"MyArray2"=20
>>>     Dim Name3 As String=3D"MyArray3"=20
>>>     If Value=3D1=20
>>>         Result=3D#Name1(0)=20
>>>     End If=20
>>>=20
>>>=20
>>> TIA for any help=20
>>>=20
>>> -- Jean-Luc Arnaud=20
>=20

--Apple-Mail-8D6A1B47-EC02-4C26-9D4A-842C7F56826A
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">As much as I like the NUG, you may get bett=
er results in the forums.&nbsp;<br><br><div id=3D"AppleMailSignature" dir=3D=
"ltr">Sent from my iPhone</div><div dir=3D"ltr"><br>On Jan 16, 2019, at 7:23=
 AM, Jean-Luc Arnaud &lt;<a href=3D"mailto:jean-luc-E/[email protected]">jean-lu=
[email protected]</a>&gt; wrote:<br><br></div><blockquote type=3D"cite"><div=
 dir=3D"ltr">
 =20
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8"=
>
 =20
 =20
    Thanks for replying, Jon.<br>
    <pre class=3D"moz-signature" cols=3D"72">Jean-Luc Arnaud

</pre>
    <div class=3D"moz-cite-prefix">Le 16/01/2019 =C3=A0 13:55, Jon Ogden a
      =C3=A9crit&nbsp;:<br>
    </div>
    <blockquote type=3D"cite" cite=3D"mid:6A1FEFB8-80DC-4568-BA71-0A2119DF5C=
[email protected]">
      <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-=
8">
      Probably because there are not too many of us left here any more,
      unfortunately. I know I didn=E2=80=99t know the answer to your questio=
n.
      Delegates might work. There=E2=80=99s a bit of work to set them up but=

      they are quite useful. I haven=E2=80=99t used them too much as they st=
ill
      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.&nbsp;
      <div><br>
        <br>
        <div id=3D"AppleMailSignature" dir=3D"ltr">Sent from my iPhone</div>=

        <div dir=3D"ltr"><br>
          On Jan 16, 2019, at 4:48 AM, Jean-Luc Arnaud &lt;<a href=3D"mailto=
:jean-luc-E/[email protected]" moz-do-not-send=3D"true">jean-luc-E/[email protected]=
</a>&gt;
          wrote:<br>
          <br>
        </div>
        <blockquote type=3D"cite">
          <div dir=3D"ltr">
            <meta http-equiv=3D"content-type" content=3D"text/html;
              charset=3DUTF-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=3D"moz-signature" cols=3D"72">--=20
Jean-Luc Arnaud

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

</pre>
            <div class=3D"moz-text-flowed" style=3D"font-family: -moz-fixed;=

              font-size: 12px;" lang=3D"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>
              &nbsp;&nbsp;&nbsp; Dim Name1 As String=3D"MyArray1" <br>
              &nbsp;&nbsp;&nbsp; Dim Name2 As String=3D"MyArray2" <br>
              &nbsp;&nbsp;&nbsp; Dim Name3 As String=3D"MyArray3" <br>
              &nbsp;&nbsp;&nbsp; If Value=3D1 <br>
              &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Result=3D#Name1(0) <br>
              &nbsp;&nbsp;&nbsp; End If <br>
              <br>
              <br>
              TIA for any help <br>
              <br>
              -- Jean-Luc Arnaud <br>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
 =20

</div></blockquote></body></html>=

--Apple-Mail-8D6A1B47-EC02-4C26-9D4A-842C7F56826A--