[Gambas-user] Questions

Benoit Minisini gambas at ...1...
Tue Dec 23 18:02:07 CET 2003


On Tuesday 23 December 2003 14:59, Rob wrote:
> On Tuesday 23 December 2003 11:52, Ken Schrock wrote:
> > How does one do a character array or string array here?
>
> BASIC style:
>
> dim score[35] as String
>
> Java style:
>
> dim score as new String[]
>
> The former are static (no REDIM) but are multi-dimensional.
> The latter are dynamic, but you have to add elements before
> referring to them (e.g.
>
> for i = 1 to 35
> 	score.add "default value"
> next
>
> )... of course, you can simulate multidimensionality in the
> dynamic ones by making an array of objects and assigning an
> array of strings to each object.... and there's also
> collections, which are like a special case of array where the
> keys are variants.

In fact keys are only strings.

>
> See also:
>
> http://www.binara.com/gambas-wiki/bin/view/Gambas/HowDoIMakeMultidimensiona
>lArray
>
> > Also, I need to check a textbox for a return key press
> > I tried
> >
> > PUBLIC SUB TextBox1_KeyPress(Ascii AS String, Code AS Integer,
> > State AS Integer)

You should better use TextBox1_Activate event, that is just what you want.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list