To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26582
26581  |  26583
Subject: 
Re: NQC programming guide
Newsgroups: 
lugnet.robotics
Date: 
Tue, 5 Dec 2006 22:17:33 GMT
Viewed: 
3562 times
  
In lugnet.robotics, linmix <linmix@gmail.com> wrote:

For example, I haven't a clue how I could use an array, what a bitwise
negation, AND, XOR or XOR is, why I would want to use #include, or even
what the increment of x++ will be.

I wouldn't say I was a great programmer either. An array is simply a sequence of
memory variables (say 1-10) that can be accessed via their numeric position.

x++

If you write x++ in your code and x=1, once used, one will be added to it so it
equals two.

If you write ++x the one will be added before it's used. It's short hand for
x=x+1;

#include lets you include files that other people have written, like a toolkit
of parts.

Steve

The other stuff I've never needed.



Message has 1 Reply:
  Re: NQC programming guide
 
(...) So why use an array with say 5 values and not 5 variables? (...) so it's always +1, not like my pocket calculator which will keep adding the original value of x if I use a double + (5++ =10, 15, 20, etc.) (...) (18 years ago, 5-Dec-06, to lugnet.robotics)

Message is in Reply To:
  NQC programming guide
 
I've been lurking on the forum for some time now, and it's about time I asked a few questions. I've read Mark Overmars' "Programming Lego Robots and using NQC" and am going through Dave Baum and John Hansen's "NQC Programmer's Guide". both are (...) (18 years ago, 5-Dec-06, to lugnet.robotics)

14 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