Dimension Data Type

This is a discussion on Dimension Data Type within the C Programming forums, part of the General Programming Boards category; I have come accross a datatype called Dimension in some Motif windows code. Does any one know where this data ...

  1. #1
    Registered User ivandn's Avatar
    Join Date
    Oct 2001
    Posts
    49

    Dimension Data Type

    I have come accross a datatype called Dimension in some Motif windows code.

    Does any one know where this data type is define?

    i.e. is it a Motif data type or standard C type ?
    Ivan

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It's not a C data type. It's something they've defined some place. It's simply amazing what you can do with five seconds and Google. See?
    ERROR 27. X Toolkit data types.

    You should be careful about interchanging integer-based X Toolkit types. For example, the Dimension data type is a 16 bit unsigned integer and the Position data type is a 16 bit signed integer. When you mix the two, the C language's type promotion rules apply, which may not be what you were expecting.

    Also, when getting Position and Dimension resource values, be sure to pass addresses of variables of the correct types to XtGetValues(). In some implementations, these are 16 bit integers. Passing the address of a 32 bit integer may cause the remaining 16 bits to be filled with invalid data, thus producing incorrect results in your program.
    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Can you check what is wrong with this code
    By Ron in forum C++ Programming
    Replies: 4
    Last Post: 08-01-2008, 10:59 PM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. C diamonds and perls :)
    By Carlos in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 05-16-2003, 10:19 PM

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