|
|
 | | Re: OO programing in RCX
|
| Thank you, David. Your gode is great! I learned a lot from your quick example, though I prefer Java more. I will encapsulate RCX commands in some utility objects and use them in more higher level objects. What I focus now is make a RF/IR adapter to (...) (26 years ago, 12-Jan-00, to lugnet.robotics.rcx)
| | |  | | Re: OO programing in RCX
|
| (...) OO works very well for things like a parse tree. I can add a new statement and just add its rules for semantic checking and code generation...all within its own class. I think part of the problem is that compiler design is a very heavily (...) (26 years ago, 12-Jan-00, to lugnet.robotics.rcx)
| | |  | | Re: OO programing in RCX
|
| I should probably mention again that legOS supports C++, and supports it even better if you add void*builtin_new(size_t n){return malloc(n)}; to the appropriate library, as v0.3.0 will. The rest of this is off-topic. Dave Baum schrieb: (...) (...) (26 years ago, 12-Jan-00, to lugnet.robotics.rcx)
| | |  | | Re: OO programing in RCX
|
| Hi Eric, Yes, I believe you could create a sensor object on the VB side and write your code thinking in terms of a sensor object. Here's one way: =-=-=-= BEGIN SAMPLE CODE =-=-=-= Private m_SensorNumber As Integer Private m_SensorType As Integer (...) (26 years ago, 11-Jan-00, to lugnet.robotics.rcx)
| | |  | | Re: How advanced can RCX programming be?
|
| (...) but (...) More than that. You can (for instance) have a 'command' thread, which looks at a variable, and decides according to the values on this whether to turn left/right or issue some other response, and does this by changeing other values. (...) (26 years ago, 11-Jan-00, to lugnet.robotics.rcx, lugnet.robotics)
| |