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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/27/05 06:09
Read: times


 
#95981 - preprocessor
Responding to: ???'s previous message
Michael Karas said:
Looks like it [the preprocessor] must just be doing text substitutions then.

Yes - that is precisely what the preprocessor does.

The preprocessor does not do maths.

Abhishek Singh said:
if i'm right then in this case floating point support routines will be added just because preprocessor is unable to handle the floating point numbers and it is making text substitution

See above

leaving the expression for the compiler even though the program has nothing to do with floting point operation ?

You have forced the expression to be floating-point by using the decimals in it:
i = 10000.0/12/22.184;

But that isn't the same expression as the original post, is it?

The original post used only integers, and a lot of brackets: that meant the integer result in the denominator was zero - and, hence, the divide-by-zero error.



List of 31 messages in thread
TopicAuthorDate
defination under Keil            01/01/70 00:00      
   int/float            01/01/70 00:00      
   IAR PreProcessor VS Keil            01/01/70 00:00      
      confusion            01/01/70 00:00      
         just doing text subistituons I guess            01/01/70 00:00      
            un            01/01/70 00:00      
               preprocessor            01/01/70 00:00      
                  Some confusion abounds...            01/01/70 00:00      
                     Wrong again!            01/01/70 00:00      
                        Take is easy...            01/01/70 00:00      
                           The important bit...?            01/01/70 00:00      
         Floating-point not supported in eval            01/01/70 00:00      
      preprocessor maths            01/01/70 00:00      
         I was being carelessly loose............            01/01/70 00:00      
            Keil Test            01/01/70 00:00      
            Save you the trouble            01/01/70 00:00      
               Oh            01/01/70 00:00      
         preproccessor maths            01/01/70 00:00      
            ##########            01/01/70 00:00      
               thats the confusion            01/01/70 00:00      
                  In context            01/01/70 00:00      
                     Thanks            01/01/70 00:00      
                  Think about it            01/01/70 00:00      
   Aside - 'C' #define names            01/01/70 00:00      
      good coding practices            01/01/70 00:00      
   Thank you            01/01/70 00:00      
      Alternatively...            01/01/70 00:00      
         re: Alternatively...            01/01/70 00:00      
      Not a good idea            01/01/70 00:00      
         Not a good idea            01/01/70 00:00      
         floating point in ISRs            01/01/70 00:00      

Back to Subject List