Information générale
Catégorie:
Codage, syntaxe et commandes
>Thanks for suggestions. We tried to avoid writing a select case with 76 branches and finally found that vb6 feature which eased the work. Im surprised that vb5 doesnt allow indirect calls( like in vfp ).
That is a rare feature that is almost exclusive to scripting languages like the xbase family. In C, the solution would be function pointers. A function pointer is literally a pointer to a function, somewhat analogous to an object reference. Perhaps you could package the functions as methods of the same name for a set of classes, and initialize an array of object references. Inheritance would be useful for this, but since the class definitions are simple it is not essential.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement