In the following section, it is verified if the value already exists inside the vector, if it does not exist it is inserted. I wish I could do this normal check, but allow the '0' to be repeated. Ex:
v_patr = [1,2,3,0,4,5,0]; //onde só o '0' pode ser inserido novamente.
w_valor //é o valor recebido como parâmetro!
if ((v_vet.indexOf(w_valor) == -1) && (w_valor != ""))
{
v_vet[w_Cont_Qtde] = w_valor;
w_Cont_Qtde = w_Cont_Qtde + 1;
}