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 / 26581
    NQC programming guide —linmix
   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 (...) (17 years ago, 5-Dec-06, to lugnet.robotics)
   
        Re: NQC programming guide —Steve Lane
     (...) 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 (...) (17 years ago, 5-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —linmix
     (...) 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.) (...) (17 years ago, 5-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —Steve Lane
      (...) If you want to perform the same operation (or sum) on multiple variables, you can use a loop. As long as you use the same variable that controls the loop to control the array, then each successive iteration through the loop will perform the (...) (17 years ago, 5-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —Lucio De Re
     (...) Because there is an additional relationship established between the array elements, namely that of succession. Five variable names would not have such a property. Now go and read a book on computer programming, please. ++L (17 years ago, 6-Dec-06, to lugnet.robotics)
   
        Re: NQC programming guide —Jordan Bradford
     I think you need to learn to program in text-based languages in general, first. Since NQC stands for "Not Quite C," you should learn the basics of programming in C or C++. (URL) sure someone will come in here and decry that approach and tell you to (...) (17 years ago, 5-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —linmix
     Thanks for the link. As for which programming language to learn, I'm sure C (or C related) is a perfect choice. For one, as you say NQC is C based. Secondly, learning C should give me a better insight in some of the things that happen in my Linux (...) (17 years ago, 6-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —steve
     (...) Yep - that's definitely the case. Once you have learned one C-like language (and I'd describe JAVA, NQC, C++, Python, Pascal, JavaScript, PHP as 'sufficiently C-like') - it's quite easy to learn another. I needed to learn PHP for a project I (...) (17 years ago, 7-Nov-06, to lugnet.robotics)  
    
         Re: NQC programming guide —Chris Phillips
     (...) This is probably the best advice I have *ever* seen given to someone who is just starting out trying to learn how to program. Spotlighted!! (17 years ago, 7-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —linmix
     Interesting! I never knew all those languages were from the same 'family'. Being a 'natural' language teacher I can see how knowing one helps to learn another related one, and I also appreciate the need for practice, practice and more practice. So (...) (17 years ago, 7-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —Chris Phillips
     (...) References for "classic" C programming are getting rather scarce, but the top hit on google for "c++ tutorial", www.cplusplus.com looks like a good place to start. It begins with the basics, and only gets into object-oriented programming in (...) (17 years ago, 7-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —Chris Phillips
      (...) Sorry for the self-reply, but I would be remiss if I didn't mention the all-time classic C reference, the book that literally defined the language and that I used so many years ago... The C Programming Language by Brian Kernighan and Dennis (...) (17 years ago, 7-Dec-06, to lugnet.robotics)
    
         Re: NQC programming guide —linmix
     (...) I googled a bit by myself, but it isn't always easy o distinguish which tutorial might be good. I've seen and bookmarked the cplusplus.com website and will have a closer look later. (...) I'll definitely take you up on that! Thanks in advance. (...) (17 years ago, 7-Dec-06, to lugnet.robotics)
   
        Re: NQC programming guide —Timothy P. Smith
   (...) You'll know when you need it, probably. (...) It's a style thing. (...) There are a number of 'Beginner's Guide to C' style books, buy one. :-) (17 years ago, 5-Dec-06, to lugnet.robotics)
 

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