hi I am trying to write a simple logic
say example
<pre>
a=20030930;
b=20031005;
c=20031130;
d=20031231;
e=20030829;
while (1){
..
if(currentdate <= dateline)
{
print(date);
}
}
where dateline is a list of all the dates eg a, b, c, d, e
But my above codes prints
b
c
d
How can I make it such that the date only appears once? Like the next nearest date is b? Then when reaches b, it will just display c?
</pre>
say example
<pre>
a=20030930;
b=20031005;
c=20031130;
d=20031231;
e=20030829;
while (1){
..
if(currentdate <= dateline)
{
print(date);
}
}
where dateline is a list of all the dates eg a, b, c, d, e
But my above codes prints
b
c
d
How can I make it such that the date only appears once? Like the next nearest date is b? Then when reaches b, it will just display c?
</pre>