To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2235
2234  |  2236
Subject: 
Re: thread class for legOS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 21 Jan 2002 09:50:08 GMT
Viewed: 
2057 times
  
On Mon, 21 Jan 2002, John A. Tamplin wrote:

No, static doesn't matter but it is possible the calling conventions of C
and C++ might be different (I don't know of a platform where that is the
case for a an extern function), so you might need to specify C linkage,
as in:

Static DOES matter; it declares the method as being a "class" method,
rather than a normal instance method. I believe there is no implicit
'this' parameter and therefore it can be treated like a normal function.
Of course, it can't be linked with any instance of the class, so you'd
have to treat it as a wrapper.

--
"From now on, we live in a world where man has walked on the moon.
And it's not a miracle, we just decided to go." -- Jim Lovell

Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>



Message has 1 Reply:
  Re: thread class for legOS
 
(...) Unless you define a function as a member function, there is no this parameter at all. In the example given, it was not a member function at all (nor should it be). I believe you are thinking of a static member function vs. a non-static member (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: thread class for legOS
 
(...) No, static doesn't matter but it is possible the calling conventions of C and C++ might be different (I don't know of a platform where that is the case for a an extern function), so you might need to specify C linkage, as in: extern "C" int (...) (23 years ago, 21-Jan-02, to lugnet.robotics.rcx.legos)

8 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR