Subject:
|
Re: mindscript - subroutines
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 23 Dec 2005 15:47:11 GMT
|
Viewed:
|
1510 times
|
| |
| |
In lugnet.robotics, Ron Karabowicz wrote:
> Hi,
> I'm new to this mindscript stuff and lugnet, so hopefully someone can shed some
> insight for me.
Your code works fine for the Spybot target. RCX2 and earlier brick types do not
support defining subroutines in MindScript. This is documented in the VPBrick
API help file which you can access from within BricxCC. Just press the context
sensitive help key (F1 on my machine) while the editor cursor is on the "sub"
keyword. Here's a quote from the page which comes up:
"Scout & RCX2 user subroutines cannot be defined in this version of MindScript
use LASM instead."
> Bricx comes up as 3.3.7.10. How does bricx know to use the mindscript compiler?
All you need to do in BricxCC to tell it to use the MindScript compiler is to
have a file open in an editor window which has a .lsc or .rcx2 file extension.
You should also make sure you have the right brick type selected for the
language features you wish to use (i.e., RCX2 or Spybot for the more advanced
features of either MindScript or NQC).
> Since I am using an RCX, is there any way of creating and saving the LASM code
> from either one of these interfaces?
You can compile your code with the Spybot brick type selected and view the
compiler output (F12). This will show the LASM equivalent. Unfortunately there
will be a few little bits of code which are not RCX2 compatible. Using the LASM
help you could probably figure out the required changes to the LASM output to
make it so that it would compile for the RCX2 target.
But your subroutine really could just be a macro. Is there a reason why you
need it to be a subroutine?
John Hansen
http://bricxcc.sourceforge.net/
|
|
Message is in Reply To:
| | mindscript - subroutines
|
| Hi, I'm new to this mindscript stuff and lugnet, so hopefully someone can shed some insight for me. I was lead to believe that Mindscript had the capability of defining subroutines. In either Bricx or Scripted I keep coming up with an error when I (...) (19 years ago, 22-Dec-05, to lugnet.robotics)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|