Hi to you all
This is my input taken from a txt file:
04001200602151430012000005
04001200602151430000014005
the result I need is:
04001200602151430006006005
04001200602151430007007005
I wrote this code, but the ELSE condition is never "used":
x=substr($i,18,3)
y=substr($i,21,3)
{if(x!=000){y=x=x/2}; else x=y=y/2;}
{print substr($i,1,17) x y substr($i,24,3)}
The result I get is:
04001200602151430006006005
04001200602151430000000005
Why does this happen?
This is my input taken from a txt file:
04001200602151430012000005
04001200602151430000014005
the result I need is:
04001200602151430006006005
04001200602151430007007005
I wrote this code, but the ELSE condition is never "used":
x=substr($i,18,3)
y=substr($i,21,3)
{if(x!=000){y=x=x/2}; else x=y=y/2;}
{print substr($i,1,17) x y substr($i,24,3)}
The result I get is:
04001200602151430006006005
04001200602151430000000005
Why does this happen?