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 / 2485
2484  |  2486
Subject: 
Re: CYGWIN & legOS 0.2.5.3
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 19 Apr 2002 12:24:35 GMT
Viewed: 
1799 times
  
Stephen,

<snip>
diff --recursive legOS-0.2.5.3/include/c++/Motor.H
legOS-0.2.5.3-working/include/c++/Motor.H
89,90c89,90
<   const void (*ms)(unsigned char speed);
<   const void (*md)(const MotorDirection dir);
---
  void (*ms)(unsigned char speed);
  void (*md)(const MotorDirection dir);

  And if I'm understanding this, this version of the
  tool chain does not support 'const'?

  If this is true, I'm not a fan of removing const from our
  code.  const use is more correct than removing it.


Well, the only thing that it is complaining about (that I had to remove) is
the use of
const void func_decl(...)

Really, I want to know what the difference is between:
const void foo(void)
--- and ---
void foo(void)

Does the first suggest to the compiler that the return value is constant,
even though it is void (no return value)?  -- or -- does the const at the
beginning indicate that the function doesn't modify any global variables?
... why not use:
void foo(void) const
as with a C++ method?

I am not a fan of changing anything unless I understand the logic involved
(and there is good reason to change it).  The "good reason" in this case was
to get it working 8-)

// Joe  <--  Glad to have a working legOS/cygwin environment



Message is in Reply To:
  Re: CYGWIN & legOS 0.2.5.3
 
(...) Am I understanding your diff? This version does not have the "hitachi" segment in the path? (...) And if I'm understanding this, this version of the tool chain does not support 'const'? If this is true, I'm not a fan of removing const from our (...) (22 years ago, 19-Apr-02, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:


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

Custom Search

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