[Gambas-user] Super quickie - array equality

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Oct 21 21:54:48 CEST 2015


Your original question hinted at 2D arrays, but [0, 0] is one dimensional
array with two values.
So, in other words you would like quick way to check first two values of
the array?

I think this is the simplest:

If myArray[0] = 0 And If myArray[1] = 0 Then

However, why you need an array for only two values?


Jussi



On Wed, Oct 21, 2015 at 10:26 PM, adamnt42 at ...626... <adamnt42 at ...626...>
wrote:

> The value, I need to know if the user has changed the default value from
> [0,0] to something else.  [0,0] is a special case and I just thought that
> maybe there was a quick way to check it that I didn't know of.
>
> cheers
> bruce
>
> On Wed, 21 Oct 2015 15:30:28 +0300
> Jussi Lahtinen <jussi.lahtinen at ...626...> wrote:
>
> > I don't get what you mean... do you want to test array bounds, or value,
> > or..?
> >
> >
> > Jussi
> >
> > On Wed, Oct 21, 2015 at 4:12 AM, adamnt42 at ...626... <adamnt42 at ...626...>
> > wrote:
> >
> > > If anyone is awake.
> > >
> > > Can I test that an integer array  of the form (x,y) is equal to [0,0]
> > > simply? In other words
> > >
> > >   Dim MyDimensions as Integer[]=[0,0]
> > > (some user stuff happens)
> > >   If MyDimensions=[0,0} then ...
> > >
> > > tia
> > > bruce
> > > --
> > > B Bruen <adamnt42 at ...3379... (sort of)>
> > >
> > >
> > >
> ------------------------------------------------------------------------------
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> --
> B Bruen <adamnt42 at ...3379... (sort of)>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list