Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Real data type

Real data type

Scheduled Pinned Locked Moved C / C++ / MFC
questioncom
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Can any one tell me that what is the meaning of real data type. I've seen and heard this term "real data type" many times specially in COM where certain constructs are common like RT_8, RT_16 e.t.c. So what is a real data type? Is it a signed data type or not. What is it ?

    B R 2 Replies Last reply
    0
    • L Lost User

      Can any one tell me that what is the meaning of real data type. I've seen and heard this term "real data type" many times specially in COM where certain constructs are common like RT_8, RT_16 e.t.c. So what is a real data type? Is it a signed data type or not. What is it ?

      B Offline
      B Offline
      BhaskarBora
      wrote on last edited by
      #2

      The data types that are supported by the system/language directly are called as real DT. Like in C/C++ 'int' and 'float' etc are real data types (i.e directly supported by compiler/system). on the other hand there are adstract or user defined data types such as structures/classes. I hope this explains ur query... ___________________________ "Think big, think fast, think ahead. Ideas are no one's monopoly"

      1 Reply Last reply
      0
      • L Lost User

        Can any one tell me that what is the meaning of real data type. I've seen and heard this term "real data type" many times specially in COM where certain constructs are common like RT_8, RT_16 e.t.c. So what is a real data type? Is it a signed data type or not. What is it ?

        R Offline
        R Offline
        RChin
        wrote on last edited by
        #3

        Data types commonly referred to as real are basically the language's way of saying it is a floating point number. I think the term real comes from the mathematical classification of numbers:

        • Natural Numbers: 1,2,3,4,..
        • Whole Numbers: 0,1,2,3,4..
        • Integers: -2,-1,0,1,2,3,..
        • Real: 3.4, 1.0, 2.0, -5.664, 3.142
        • Complex Numbers: 5+3i

        So the real data type can be used to represents numbers that can be whole (3,5,6) or a fraction of a number (2.1, 5.6, 1.333..). In C++, real data type can be defined as a float, or a double variable. Double uses a higher level of precision than a float value. COM Objects represents real values using the VARIANT type of VT_R4 (float) or VT_R8 (double). VT_R4, RT_4 and float are just language specific ways of representing the same number, just expressed differently. I'm sure there are more detailed explaination on data types on this topic, but I just wanted to give a general view, without going into to much details and specifics. Maywell be that Its not as accurate, but you should get the idea.


        "..Even my comments have bugs!"
        Inspired by Toni78

        D 1 Reply Last reply
        0
        • R RChin

          Data types commonly referred to as real are basically the language's way of saying it is a floating point number. I think the term real comes from the mathematical classification of numbers:

          • Natural Numbers: 1,2,3,4,..
          • Whole Numbers: 0,1,2,3,4..
          • Integers: -2,-1,0,1,2,3,..
          • Real: 3.4, 1.0, 2.0, -5.664, 3.142
          • Complex Numbers: 5+3i

          So the real data type can be used to represents numbers that can be whole (3,5,6) or a fraction of a number (2.1, 5.6, 1.333..). In C++, real data type can be defined as a float, or a double variable. Double uses a higher level of precision than a float value. COM Objects represents real values using the VARIANT type of VT_R4 (float) or VT_R8 (double). VT_R4, RT_4 and float are just language specific ways of representing the same number, just expressed differently. I'm sure there are more detailed explaination on data types on this topic, but I just wanted to give a general view, without going into to much details and specifics. Maywell be that Its not as accurate, but you should get the idea.


          "..Even my comments have bugs!"
          Inspired by Toni78

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          RChin wrote: I think the term real comes from the mathematical classification of numbers: It's an actual data type in Pascal (and related languages).

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups