c code

Discussion in 'Programmer's Corner' started by aibelectronics, Aug 30, 2005.

  1. aibelectronics

    Thread Starter Member

    Aug 26, 2005
    24
    0
    Hi, I have a little piece of code I can't quite crack:

    c=c*0.0196;

    c actually receives inputs from an interfaced hardware (1's and 0's essentially), 0.0196 is the resolution (of the ADC). I was wondering how could such a multiplication be possible between a real decimal number and a matrix made up of strings of 1's and 0's?
    thanks
     
  2. Brandon

    Senior Member

    Dec 14, 2004
    306
    0
    Need to see more code.

    From the looks its an array member multi by a double.
    Perfectly legal.
     
  3. aibelectronics

    Thread Starter Member

    Aug 26, 2005
    24
    0
    thanks for the reply. Actually i've got the question answered long ago and i should have notified that. ofcourse it is legal!, but then a problem arises due to type conflict i.e performing an arithmetic operation between an integer and double which was the main problem.
     
Loading...