RTTI in C

N

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
 
J

John Bode

Neo said:
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?
 
E

Eric Sosman

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

Richard Heathfield

Eric Sosman said:
Neo wrote On 07/26/06 10:45,:

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

Toni Uusitalo

Eric said:
Neo wrote On 07/26/06 10:45,:



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
 
J

jaysome

Neo said:


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


#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
 
D

Default User

Bright said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top