Slimelite BBS

VB/TBV/VBC++ (was Cop

Back to DRIVING

From James Pharaoh · 1996-04-10 03:29 · #69266 in DRIVING

In reply to Re: VB/TBV/VBC++ (was Cop by Paul Walker

-=> Following up a message from Paul Walker to Peter Dalton <=-

 PW> You could usually do the same thing with records, etc. - however,
 PW> objects keep it a lot "tidier"! :) It was a nice thing, actually -
 PW> I'd just say, for example, "if (encrypt.chosen) then" etc. , where
 PW> encrypt was one of the  buttons, and chosen was a method.

Except when you come to virtual methods. If you have a CAD program you can create a general object for all shapes, with virtual methods such as draw. Then descend objects from that with methods to draw each differently. Create each object with the correct init and then treat it as the general object. But when the draw method is called, being virtual, the correct method for that object will be run. Of course, you could use case statements, but that would not help standard libraries, where objects are predefined.

James.

Sysop, The Settlers BBS, 01423 323845 
---
 * Origin: The Settlers BBS (2:256/703)