Re: How to pass function name as a parameter?
From: Levan Jgarkava (levanikoNoSpam_at_mailru.com)
Date: 05/25/04
- Previous message: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- In reply to: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- Next in thread: Duane Bozarth: "Re: How to pass function name as a parameter?"
- Reply: Duane Bozarth: "Re: How to pass function name as a parameter?"
- Reply: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 01:03:36 +0400
Hi,
> When thinking about converting C++ to VB, it is best to think in terms of
> your objectives, and not specific (C++) coding techniques. The languages
> differ in much more than syntax; they also differ in a more fundamental,
> conceptual, way. Don't look for one-to-one translations such as are
implied
> by the questions you've been asking. It's rare that you'll find things
that
> work in exactly the same way between the two languages. VB, in general, is
> more of a "high-level", or abstract, language than is C++, which, like its
> forebear C, operates closer to the "binary" level. VB doesn't have
pointers
> in the same sense as C or C++, but it does have facilities designed to
> solve the same kinds of problems that you solve in C++ with pointers.
You're right. I'm doing it in the way you're talking :) Of course I can
convert C++ code to VB code indirectly, but before I want to fond out is
there a direct way :)
But I found places, where code could be converted almost one-to-one and I
wanted to know where
is the limit of one-to one converting :), because the code is really huge
and it will be very useful and will
save very much time if I could find more places where code could be
converted easily :)
Thanks for answer.
There is also one question: what is the best method to convert overloaded
index operators with return type of reference?
for example:
class A
{
private: int data[100];
public: int& operator[] (int index) {return data[index];}
}
Now I can create function like this:
Private data(100) As Integer
Public Sub operator_index(ByVal index As Integer, ByVal NewValue As Integer)
data(index) = NewValue
End Sub
That's all, but is there any better resolution?
--
Best Regards,
Levan Jgharkava
- Previous message: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- In reply to: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- Next in thread: Duane Bozarth: "Re: How to pass function name as a parameter?"
- Reply: Duane Bozarth: "Re: How to pass function name as a parameter?"
- Reply: Russ Holsclaw: "Re: How to pass function name as a parameter?"
- Messages sorted by: [ date ] [ thread ]