printk() queston.

I am using ANSI C as a programming language and im new in this field.

I'm trying to display an 8.8 fixed point format decimal type data for debugging purposes to be able to see if my computations are correct.
However, i can't display it using printk() function. Do i have to #include a specific header file to be able to use this function? if yes, what is it? if no.. do u have a suggestion what should i use?

can you point me a document or a link that explains what printk is?

Comments

  • : I am using ANSI C as a programming language and im new in this field.
    :
    : I'm trying to display an 8.8 fixed point format decimal type data for debugging purposes to be able to see if my computations are correct.
    : However, i can't display it using printk() function. Do i have to #include a specific header file to be able to use this function? if yes, what is it? if no.. do u have a suggestion what should i use?
    :
    : can you point me a document or a link that explains what printk is?
    :
    Sounds like you want the printf function from stdio.h. Try:

    float myvalue = 12345.123456789012;

    printf ("my value is: %8.8f
    ", myvalue);
  • : : I am using ANSI C as a programming language and im new in this field.
    : :
    : : I'm trying to display an 8.8 fixed point format decimal type data for debugging purposes to be able to see if my computations are correct.
    : : However, i can't display it using printk() function. Do i have to #include a specific header file to be able to use this function? if yes, what is it? if no.. do u have a suggestion what should i use?
    : :
    : : can you point me a document or a link that explains what printk is?
    : :
    : Sounds like you want the printf function from stdio.h. Try:
    :
    : float myvalue = 12345.123456789012;
    :
    : printf ("my value is: %8.8f
    ", myvalue);
    :
    thank u for the reply.. I'll try it.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories