[Gambas-user] Dynamically changed arrays
Eilert
eilert-sprachen at ...221...
Thu Mar 18 08:23:49 CET 2004
Daniel -
danielcampos at ...282... schrieb:
>>DIM t, xyz, vzk AS STRING
>
>
> Note that, using VB, t is variant, xyz is variant and vzk is string,
Yes, but in VB I usually do it this way:
option explicit
defint a-z
sub something
dim i,j,k 'integers for counting
dim t$, x$ 'for string handling
program text
end sub
and if it's not too much, I even write
dim i, j, t$, po
which gives me 3 integers and one string. In order to make a difference
between those standard variables used in almost all functions/subs, I
make another line for extraordinary ones:
dim i, j, t$, po, x$
dim message as boolean
dim ls$()
static oldValue, newValue
Being forced to define single variables on a line in Gambas, I might use
it for commenting the variables. Maybe that will make sense. Otherwise,
the comma separated ones are a bit more compact, and in most cases you
won't need comments for them because it is programmer's practice to name
them in a usual way (i, j, t$, or so).
- Rolf
More information about the User
mailing list