jlowrey@skat.usc.edu (John 'Fritz' Lowrey) (04/15/91)
Help appreciated, I am writing an application in MS Quick Pascal (yes, there are some of us who will admit it!) and using its OO extentions. I need to create a dynamic linked list of objects, all decendants of the same base class. The rub is that, the (only) two common fields to all instances are two POINTER type variables, predictably enough for the "next" and "prev" in the list. When I use the objects, I need to cast these pointers to a specific type. This needs to be done at run time, because the user could choose any of several tools to create screen objects (yup, it's a graphics app). Using the linked list is no problem, traversing it is fairly easy, heck, I can even write and read it to and from a disk. But, when I need to form a new node in the list... Smack: compiler error. Any help on the casting of generic POINTERs to specific classes at run time would be greatly appreciated. Even Turbo Pascal source would be helpful (some of us can read in multiple dialects!). OO specific help is best, but standard (ie non-objective) pascal is probably applicable too. EDITORIAL: MS Quick Pascal is a great programming environment for OO developement. It conforms MUCH more closely to the emerging ANSI standard on Objective extentions to pascal (ANSI X3J9) than Turbo, and it is source compatable with TurboP through version 5. I must admit, the documentation leaves a great deal to be desired, but an experienced programer can make due with the online documentation and a bit of luck. Beginners probably less well served, but for $26 (educational price) it's a great bargain. End of editorial. Any help much appreciated... Fritz (jlowrey@skat.usc.edu) -- J. "Fritz" Lowrey USC Computer Consulting Internet: jlowrey@usc.edu UUCP: !uunet!usc!jlowrey