Thread: char Handling, probably typical newbie stuff

  1. #16
    Registered User
    Join Date
    Jun 2009
    Mmmh, when I let it run on my PC, it does indeed work. But since it's designed to run on an Atmel Chip, I have to cross-compile and there seems to be something going wrong with scanf and sscanf.
    Oh, well, nevermind, it will work with atof just as well. At least I'm happy that I seem to be able to write code that actually works

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    Are you sure the atmel cross compiler allows float/double functions at all? Check the atmel compiler spec for scanf() etc.

    Or perhaps you need to use libraries in a different manner - e.g. supply a floating point version of the library FIRST, before the general C library, so that the linker picks the floating point capable version of scanf/printf instread of the one in the "integer only" version of those functions?

    It is not unusual that small embedded processors have no/little support for floating point. Or that there are a special "floating point support" version of the libraries to reduce the code size when no floating point is being used.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  3. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  5. Strings are V important...
    By NANO in forum C++ Programming
    Replies: 15
    Last Post: 04-14-2002, 11:57 AM