To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 265
264  |  266
Subject: 
Re: converting Mac to PC and the Lego remote
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 3 Dec 1999 02:07:02 GMT
Viewed: 
2221 times
  
In article <FM4GqH.7ro@lugnet.com>, "Jenny" <jenbkr@iastate.edu> wrote:

Yes I am just converting programs and no the language is not the same
regardless of the enviornment.
On a PC wait = until on a Mac,  void does not compile, and several others.
I recently received  The Unofficial Guide to LEGO® MINDSTORMS™ Robots
By Jonathan B. Knudsen.  When I downloaded the programs off the internet to
use with the book, they would not compile.  I had to change a lot of the code
and the program then would not work with the robot.  I was hoping someone knew
of a conversion page so I would not have to make an entirly new program.



The problems you are seeing are differences between version 1.x and 2.x of
the NQC language (not Mac/PC differences).

Here are a few differences between 1.x and 2.x.  This is by no means a
comprehensive list, but it should at least allow you to quickly determine
if the code you're looking at is 1.x or 2.x.

1.x            2.x
---------------------
wait           until
Sleep()        Wait()
inline         void

I'm pretty sure Jonathan's code is 2.x, so using a 2.x version of NQC
should fix things.

Even if you're using 1.x sources, I'd suggest using the 2.x compiler.  The
2.x compiler has an option that lets it compile 1.x sources.  Activating
this option depends on the specific tool you are using.  For command line
versions of NQC, you do this with the "-1" option.  For MacNQC and RcxCC,
its in the preferences screen.  If you are using RcxCC, you need to be
using version 3.0 or greater (RcxCC 2.0 was based on the 1.x compiler - I
know its confusing).  RcxCC also has a feature that converts 1.x source to
2.x.

If you're having trouble compling 2.x sources with the latest compiler
versions, then perhaps the compiler is in "1.x compatability" mode.  If
its MacNQC, open up the preferences dialog and make sure the 1.0
compatability option is unchecked.  If you're using RcxCC, make sure its
version 3.0 or greater, and also verify the option is unchecked.  If
you're still having problems, please let me know.

Dave Baum

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Re: converting Mac to PC and the Lego remote
 
Yes I am just converting programs and no the language is not the same regardless of the enviornment. On a PC wait = until on a Mac, void does not compile, and several others. I recently received The Unofficial Guide to LEGO® MINDSTORMS™ Robots By (...) (25 years ago, 2-Dec-99, to lugnet.robotics.rcx.nqc)

6 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