RTTI in C

Discussion in 'C Programming' started by Neo, Jul 26, 2006.

  1. Neo

    Neo Guest

    what is RTTI? and how to implements it? give me sourceful link for
    learn and implements it (using standard C mean portable).

    regards,
    -aims
    Neo, Jul 26, 2006
    #1
    1. Advertising

  2. Neo said:

    > what is RTTI?


    Since it's upper case, my money would be on a macro name.

    > and how to implements it?


    #define RTTI 42

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Jul 26, 2006
    #2
    1. Advertising

  3. Neo <> wrote:

    > what is RTTI?


    http://www.google.com/search?q=rtti

    > and how to implements it? give me sourceful link for
    > learn and implements it (using standard C mean portable).


    STFW.

    --
    C. Benson Manica | I *should* know what I'm talking about - if I
    cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
    Christopher Benson-Manica, Jul 26, 2006
    #3
  4. Neo

    phus Guest

    funny.
    Richard Heathfield wrote:
    > Neo said:
    >
    > > what is RTTI?

    >
    > Since it's upper case, my money would be on a macro name.
    >
    > > and how to implements it?

    >
    > #define RTTI 42
    >
    > --
    > Richard Heathfield
    > "Usenet is a strange place" - dmr 29/7/1999
    > http://www.cpax.org.uk
    > email: rjh at above domain (but drop the www, obviously)
    phus, Jul 26, 2006
    #4
  5. Neo

    John Bode Guest

    Neo wrote:
    > what is RTTI? and how to implements it? give me sourceful link for
    > learn and implements it (using standard C mean portable).
    >
    > regards,
    > -aims


    If you don't know what it is, why do you want to know how to implement
    it? What were you planning on using it for?
    John Bode, Jul 26, 2006
    #5
  6. Neo

    Eric Sosman Guest

    Neo wrote On 07/26/06 10:45,:
    > what is RTTI? and how to implements it? give me sourceful link for
    > learn and implements it (using standard C mean portable).


    Round Trip Time Inconsistency. This is a reference to
    the so-called "twin paradox" of Special Relativity, in which
    one twin takes a high-speed journey while leaving the other
    behind, and upon return discovers that their ages are no
    longer the same.

    RTTI cannot be implemented in strictly conforming C
    because of the requirement that the travelling twin must
    move at high speed. The C Standard says nothing about
    speed, which is purely an artifact of the implementation
    and not a property of the language. Therefore, any attempt
    to demonstrate RTTI necessarily involves the implementation-
    dependent concept of "speed" and is thus non-portable.

    --
    Eric Sosman, Jul 26, 2006
    #6
  7. Eric Sosman said:

    >
    >
    > Neo wrote On 07/26/06 10:45,:
    >> what is RTTI? and how to implements it? give me sourceful link for
    >> learn and implements it (using standard C mean portable).

    >
    > Round Trip Time Inconsistency. This is a reference to
    > the so-called "twin paradox" of Special Relativity, in which
    > one twin takes a high-speed journey while leaving the other
    > behind, and upon return discovers that their ages are no
    > longer the same.
    >
    > RTTI cannot be implemented in strictly conforming C
    > because of the requirement that the travelling twin must
    > move at high speed.


    But it could be modelled to a satisfactory degree of accuracy.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Jul 26, 2006
    #7
  8. Eric Sosman wrote:
    >
    > Neo wrote On 07/26/06 10:45,:
    >
    >>what is RTTI? and how to implements it? give me sourceful link for
    >>learn and implements it (using standard C mean portable).

    >
    >
    > Round Trip Time Inconsistency. This is a reference to
    > the so-called "twin paradox" of Special Relativity, in which
    > one twin takes a high-speed journey while leaving the other
    > behind, and upon return discovers that their ages are no
    > longer the same.
    >


    There's a time inconsistency between wanting to implement something
    before knowing what that something is!

    Did I get it? ;-)

    with respect,
    Toni Uusitalo
    Toni Uusitalo, Jul 26, 2006
    #8
  9. Neo

    Bright He Guest

    Run-time type identification



    "Neo" <>
    ??????:...
    > what is RTTI? and how to implements it? give me sourceful link for
    > learn and implements it (using standard C mean portable).
    >
    > regards,
    > -aims
    >
    Bright He, Jul 27, 2006
    #9
  10. Neo

    jaysome Guest

    On Wed, 26 Jul 2006 14:53:52 +0000, Richard Heathfield
    <> wrote:

    >Neo said:
    >
    >> what is RTTI?

    >
    >Since it's upper case, my money would be on a macro name.
    >
    >> and how to implements it?

    >
    >#define RTTI 42


    I get a similar result, and I'm prepared for changes.

    #define RUN 1
    #define TIME 5
    #define TYPE 12
    #define INFORMATION 24
    #define R RUN
    #define T1 TIME
    #define T2 TYPE
    #define I INFORMATION
    #define RTTI (R + T1 + T2 + I)

    Regards
    --
    jay
    jaysome, Jul 27, 2006
    #10
  11. Neo

    Default User Guest

    Bright He wrote:

    > Run-time type identification


    1. Don't top-post. Your reply belongs following or interspersed with
    properly trimmed quotes.

    2. Your answer is incorrect. It does NOT mean that in C, as there is no
    such thing.





    Brian
    Default User, Jul 27, 2006
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Harrison

    Re: RTTI

    John Harrison, Jul 14, 2003, in forum: C++
    Replies:
    2
    Views:
    444
    John Harrison
    Jul 14, 2003
  2. Alf P. Steinbach

    Re: RTTI

    Alf P. Steinbach, Jul 14, 2003, in forum: C++
    Replies:
    0
    Views:
    457
    Alf P. Steinbach
    Jul 14, 2003
  3. Steven Lien

    About RTTI

    Steven Lien, Aug 19, 2003, in forum: C++
    Replies:
    4
    Views:
    586
    Ivan Vecerina
    Aug 19, 2003
  4. BillyO
    Replies:
    2
    Views:
    480
    dslater
    Sep 30, 2003
  5. tirath
    Replies:
    3
    Views:
    696
    Ivan Vecerina
    Oct 12, 2003
Loading...

Share This Page