stringArrayRemove for vector arrays?

Hi,
The function clear{$vector[index]} doesn't seem to do much clearing.

for string arrays I loop

$stringArray[$i] = "";
clear {$stringArray[$i]};

then I use

$stringArray = stringArrayRemove({"*"}, $stringArray);
$stringArray = stringArrayRemove({""}, $stringArray);

but such a command doesn't exist for vector[] types, I could assign it them to <> and get the other functions to ignore these values, but I use the size command a lot, which is when it gets annoying (I could work my way around that too, but isn't there a simply way?).

Cheers.
-Shydo

i don't know why its doing what its doing, but you could always write your own clear procedure... seems easier and more elegant than hacking your way around the problem by not using size commands when you want to. its not really all that much work either.

Only solution I've figured out is to continue using a string array, and converting the data at the start of each proc which needs it.

I forgot to mention (my bad) I need to remove entries from a global vector array.

Writing procs for data handling is not to hard indeed, and I've written some such as shiftStringArray invertStringArray, and visual procedures for working with multidimentional arrays, but I don't know if there's a solution for this.

Cheers.

nah, thats no big deal if its a global variable. only adds another step...

doing a straight out clear on an array resets its size, then you can fill it up again with the results of your "cropping" proc.

there are a heap of people who have already written string procs to do what you're after. Of course, if you're like me, you still have to do everything yourself.
Cheers!

clear $ApeDatabase;

Gosh that was quite easy indeed (for some reason I remember getting errors asking me to specify an index value! which is why I did not try.. assumptions assumptions from my part). Anyway yes wrinting my proc will be easy.

Of course, if you're like me, you still have to do everything yourself.

why do you redo everything yourself? =] Granted there's no quicker way of progressing than reading a procedure you want to achieve and try reproducing it, but it's not mutually exclusive with re-using someone else's procs. Just wondering.

-Shydo

i think its the masochist in me.

no seriously, i think i'm the sort of person that really needs to do it in order to remember it. I can learn stuff just fine without doing it, but its just somehow much more solid in my mind when i do it myself.

that, and debugging is a lot easier if you've done it yourself...

no seriously, i think i'm the sort of person that really needs to do it in order to remember it. I can learn stuff just fine without doing it, but its just somehow much more solid in my mind when i do it myself.

Well I agree. If you'd spend your time re-using code you'd probably end up like this family relative of ours who was a dry-ski-slope instructor, he'd done it for years, and broke his leg the first day he went skying on a real mountain hehe. : )
Sometimes it's better to practice with the real thing.

that, and debugging is a lot easier if you've done it yourself...

Gosh I find it's the opposite lol

Thanks again!