Autor Beitrag
Mike_C
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 207

Win XP
D7 Enterprise
BeitragVerfasst: So 30.01.05 20:46 
Hi
gibt es eigentlich unter Delphi sowas wie nen void-pointer in c?
ich möchte darüber nämlich ein paar informationen über variablen herausfinden, z.B. von welchem Typ sie sind, wo sie im speicher liegen und so sachen. geht das irgendwie?

Gruß Mike

P.S: die suche ging irgendwie nicht bei mir?! zumindest konnte keine Seite geladen werden. kann aber auch sein, dass das problem irgendwo bei meinem rechner liegt.

_________________
Life is, what some people call a mystery. To me life's just a lesson, you're learning when you're through. So why do we try to understand?
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: So 30.01.05 21:07 
Mike_C hat folgendes geschrieben:
gibt es eigentlich unter Delphi sowas wie nen void-pointer in c?
Pointer.

Mike_C hat folgendes geschrieben:
ich möchte darüber nämlich ein paar informationen über variablen herausfinden, z.B. von welchem Typ sie sind, wo sie im speicher liegen und so sachen. geht das irgendwie?
Bei Variablen, die in Register optimiert wurden, geht's nicht, bei allen anderen kannst du einen Pointer auf diese Variable nehmen. Typinformationen gibt es im Allgemeinen nicht für Variablen, sondern nur für published-Properties, die mit aktivierter Typinformation kompiliert wurden, z.B. alle Nachfahren von TPersistent. Allerdings habe ich in der OnlineHilfe keine Informationen darüber gefunden, wie solche RTTI-Tabellen aufgebaut sind, dafür aber, daß sie sich von Compiler-Version zu Compiler-Version ändern können, ganz so einfach wird es also nicht.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Mike_C Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 207

Win XP
D7 Enterprise
BeitragVerfasst: Mo 31.01.05 15:34 
tja schade. dann wird es wohl doch nicht so einfach werden, eine allgemeine klasse zu schreiben, die mir verkettete Listen verwaltet. naja, danke schonmal. vielleicht finde ich ne andere lösung.

Gruß Mike

_________________
Life is, what some people call a mystery. To me life's just a lesson, you're learning when you're through. So why do we try to understand?
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mo 31.01.05 15:56 
Mike_C hat folgendes geschrieben:
tja schade. dann wird es wohl doch nicht so einfach werden, eine allgemeine klasse zu schreiben, die mir verkettete Listen verwaltet.
Naja, über 'nen typenlosen Pointer eben. Und das mit dem Typen kannst du ja dem Anwender der Klasse überlassen, er wird wohl wissen, welche Werte er in der Klasse hat und wird sie entsprechend in den richtigen Typ casten.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Mike_C Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 207

Win XP
D7 Enterprise
BeitragVerfasst: Mo 31.01.05 16:16 
tommie-lie hat folgendes geschrieben:
..., er wird wohl wissen, welche Werte er in der Klasse hat und wird sie entsprechend in den richtigen Typ casten.


stimmt. darüber kann man's machen. danke für deine tipps :D

Gruß Mike

_________________
Life is, what some people call a mystery. To me life's just a lesson, you're learning when you're through. So why do we try to understand?