Hi.
--- In [EMAIL PROTECTED], "brucexs" <[EMAIL PROTECTED]> wrote:
> > Win.Debug("After growing by 1:", Vec.Length(Vector), "(should be
> 4)")
> > Vector = Vec.Destroy(Vector)
Destroying a local vector isn't necessary, is it?
> This is a bug, although I think what you really want to check is
> vec.capacity. But it is not set correctly either.
Capacity is not length, this is clear. But:
local test = vec.create(10, 1)
vec.grow(test, 1)
win.debug(vec.capacity(test))
gets me "11" with my current vec.dll. Isn't this correct?
> BTW, have you considered using a map to store aliases in your
> script,to possibly simplify the newline stuff? Or possibly two
> vectors, one with the alias and one with the command. (A fancy
> approach with vectors is to use binary search on the names and
> doublesort to keep both vectors sorted the same)
Just had a brief look at the ARB-script. Seems to be quite elaborate
but this newline/script parsing is really rather awkward IMHO. I used
that two vectors approach in my old runbox-script, there where no
maps then. I think I'd definitely use a map now for commands in
memory, probably an ini-file to store commands. Just my two cents
(wisenheimer, I know...;-)
BTW: It's also possible two use two-dimensional maps/vectors for
storing some more complicated stuff, which gives you something a bit
like thingies known as an "object" in other languages, like:
aliases[0]["name"]
aliases[0]["command"]
Unfortunately this exact syntax doesn't work, you have to work around
it, but the concept does...
Mockey
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->
**** EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/