Thread: tupedef datatypes

  1. #1
    Registered User
    Join Date
    Feb 2019
    Posts
    38

    tupedef datatypes

    Hi evereyone,

    I've seen in many libraries to define new data types names. For example I was looking this

    Code:
    /** C99 standard */
        typedef int16_t            BSX_S16;  /**< signed short */
        typedef uint16_t          BSX_U16;  /**<unsigned short */
        typedef int32_t            BSX_S32;  /**<signed int */
        typedef uint32_t          BSX_U32;  /**<unsigned int */
    
    
        typedef int8_t              BSX_S8;  /**< signed char */
        typedef uint8_t             BSX_U8;  /**< unsigned char */
        typedef int64_t             BSX_S64; /**< signed long long */
        typedef uint64_t           BSX_U64; /**< unsigned long long*/
        typedef uint8_t             BSX_BIT; /**< unsigned char */
        typedef uint32_t           BSX_BOOL;/**<unsigned int */
    What is the reason behind this? I mean, I know the purpose of typedef but I cannot see the reason of changing the name for example from int8_t to BSX_S8

    Thanks in advance
    Nick

  2. #2
    Registered User
    Join Date
    Aug 2019
    Location
    inside a singularity
    Posts
    306
    It's just a matter of style, I think.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook, The Wizardry Compiled

  3. #3
    Registered User
    Join Date
    Feb 2019
    Posts
    38
    Thanks Zeus_!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bit operations on different datatypes
    By jipe4153 in forum C Programming
    Replies: 5
    Last Post: 09-08-2010, 02:20 PM
  2. confusion on use of datatypes!
    By Saimadhav in forum C++ Programming
    Replies: 1
    Last Post: 08-23-2008, 12:38 AM
  3. C++ Datatypes and OS Datatypes :: C++
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 12-07-2002, 02:06 PM
  4. datatypes
    By RyeDunn in forum C++ Programming
    Replies: 7
    Last Post: 07-10-2002, 08:36 AM
  5. DataTypes
    By Scorpion-ice in forum C++ Programming
    Replies: 3
    Last Post: 07-02-2002, 11:48 AM

Tags for this Thread