send non unique values from one container to another container

hi,

Any one tell me that how can i send non unique from one container to anonther container.

Ex :

con=(1,1,2,3,3,5)

i want to send only duplicate records(1,3)

hi kola,

try like this…

static void ctcnonunique(Args _args)
{
container c = [1,2,1,3,4,3], c1;
int i, j, l, m, p;
;

c1 = connull();
for(i=1; i <= conlen(c); i++)
{
l = conpeek(c,i);
for(j = 1; j <= conlen(c); j++)
{
if(i != j || i == conlen(c))
{
if(i != j)
{
m = conpeek(c,j);
}
if(m == l)
{
if(!confind(c1,l))
{
p++;
c1 = conins(c1,p,l);
info(strfmt(“At %1 Position Value is %2”,confind(c1,l),conpeek(c1,p)));
break;
}
}
else
{
continue;
}
}
else
{
continue;
}
}
}
}

for unique write like this…

static void ctcforunique(Args _args)
{
container c = [1,2,3,4,1,5,2,6], c1;
int i, j, l, m, p;
;

c1 = connull();
for(i=1; i <= conlen(c); i++)
{
l = conpeek(c,i);
for(j = 1; j <= conlen(c); j++)
{
if(i != j || i == conlen(c))
{
if(i != j)
{
m = conpeek(c,j);
}
if(m != l)
{
if(j == conlen(c))
{
p++;
c1 = conins(c1,p,l);
info(strfmt(“At %1 Position Value is %2”,confind(c1,l),conpeek(c1,p)));
break;
}
else
{
continue;
}
}
else
{
break;
}
}
else
{
continue;
}
}
}
}

thank you chaitanya