James Tyrrell <jtyr...@eclipse1.demon.co.uk> wrote in article
<34165eca...@news.demon.co.uk>...
> How would I go about converting a variable that is of the type *char
> into a type *dec so that I can compare two values? I have some dates
> that I have converted into a number representing the day of the year,
> I need to compare these to see if one is older than the other but they
> are both of the type *char? How would I go about this?
>
> Thanks in advance.
>
> James Tyrrell.
>
Dean Boyle.
If both of them have the same size, you can just compare them
alphabetically. Comparing a string with '00100' with '01234' will tell you
that the first one is smaller. The only important thing is that they've
the same size and are right aligned. (leading zeros is not even an issue)
Regards,
Paul
_______________
James Tyrrell <jtyr...@eclipse1.demon.co.uk> wrote in article
<34165eca...@news.demon.co.uk>...
> How would I go about converting a variable that is of the type *char
> into a type *dec so that I can compare two values? I have some dates
> that I have converted into a number representing the day of the year,
> I need to compare these to see if one is older than the other but they
> are both of the type *char? How would I go about this?
>
> Thanks in advance.
>
> James Tyrrell.
>
The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, Merck & Co., Inc. All responsibility for the statements
made in this Usenet posting resides solely and completely with the
sender.