C99 formats

This is a discussion on C99 formats within the C Programming forums, part of the General Programming Boards category; Anyone here ever uses the c99 format specifiers? Code: #define PRIdFAST8 "d" #define PRIdFAST16 "d" #define PRIdFAST32 "d" #define PRIdFAST64 ...

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    330

    C99 formats

    Anyone here ever uses the c99 format specifiers?

    Code:
    #define PRIdFAST8	"d"
    #define PRIdFAST16 "d"
    #define PRIdFAST32 "d"
    #define PRIdFAST64 "lld"
    They seem so....bloated

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    Where did you get all those PRIdFAST macros from?
    I don't recognise them as being C99.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    It appears to be in <inttypes.h>

    --
    Mats
    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.

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    yes inttypes.h, theres lots more and also for scanf

    Code:
    #define SCNd8		"hhd"
    #define SCNd16		"hd"
    #define SCNd32		"d"

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Anyone here ever uses the c99 format specifiers?
    Yes, I do.

    >They seem so....bloated
    Yes, they are. Such is the price you pay in C99 for a solid guarantee about the type.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c99
    By Nextstopearth in forum C Programming
    Replies: 8
    Last Post: 02-20-2009, 10:58 PM
  2. C89 or C99
    By talin in forum C Programming
    Replies: 6
    Last Post: 05-26-2008, 12:45 PM
  3. C99 and int main()
    By cwr in forum C Programming
    Replies: 8
    Last Post: 09-19-2005, 06:54 AM
  4. C99 support?
    By Devil Panther in forum C Programming
    Replies: 3
    Last Post: 08-22-2005, 02:07 PM
  5. My first game
    By homeyg in forum Game Programming
    Replies: 20
    Last Post: 12-22-2004, 04:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21