Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/11/04 19:53
Read: times


 
#62367 - RE: Convert string to integer
Responding to: ???'s previous message
It is easy ... compare char by char and detect with an 'ORed funtion to see if number is smaller.

first check length of string.. if number is greater then 5 digits... function fails.
if length is not equal to 5 digits then funtion may convert safely
then check first number char ... must be smaller than 7.. else function fails.
then check second number char .. must be smaller than 6.. else function fails.

... so on

then check last number char ... if smaller then 5 function convert safely... else function fails.

return 0xFFFF;



List of 6 messages in thread
TopicAuthorDate
Convert string to integer            01/01/70 00:00      
   RE: Convert string to integer            01/01/70 00:00      
      RE: Convert string to integer            01/01/70 00:00      
         RE: Convert string to integer            01/01/70 00:00      
   RE: Convert string to integer            01/01/70 00:00      
      RE: Convert string to integer            01/01/70 00:00      

Back to Subject List