1
In the following section, it is verified whether the value already exists within the vector, if it does not exist it is inserted. I wish I could do this normal check, but allow '0' to repeat. 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;
}
And where do you use the
v_patr
? You can’t just add the condition|| w_valor === 0
?– Beterraba