Code to copy Unique values from container to container:

Hi,
Use the below code to copy unique values from one container to other container….

static void Container2container(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++;
conins(c,p,l);
info(strfmt("At %1 Position Value is %2",p,l));
break;
}
else
{
continue;
}
}
else
{
break;
}
}
else
{
continue;
}
}
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s