To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 3243
3242  |  3244
Subject: 
Re: Programming, NQC and the RCX
Newsgroups: 
lugnet.org.ca.rtltoronto
Date: 
Fri, 11 Jan 2002 19:46:33 GMT
Viewed: 
960 times
  
In lugnet.org.ca.rtltoronto, David Koudys writes:
K folks, I have a programming problem :(

I set an array of 16 (go figure)
and I have a few misceelaneous int values (4 thus far)
and I try to set up another aray of 16 and it gives me something equalling
an out of memory error!  Grrr!!

As the others have said, 32 variables is the limit for the standard
firmware. The new 2.0 firmware gives you a bit more (I think you can have a
few more global variables). But, heres my take on the matter: Why do you
need two 1x16 arrays? I came up with a NQC program that uses only one 1x16
array. If you are using one array to store the pattern that the gameboard
should be in, and use the other array to store the present status of the
gameboard, couldn't you combine this? Heres what I did: Initialize the array
to represent the correct x pattern. Blocks can be 1 and empties 0. Now, as
the robot sees the board, check what you see against what is curently in the
array, and update it if necessary. Does this help or am I way off track?

Rob

the mechanical engineer says don't be mechanically rude :)



Message is in Reply To:
  Programming, NQC and the RCX
 
K folks, I have a programming problem :( Here's the issue: I set an array of 16 (go figure) and I have a few misceelaneous int values (4 thus far) and I try to set up another aray of 16 and it gives me something equalling an out of memory error! (...) (23 years ago, 10-Jan-02, to lugnet.org.ca.rtltoronto)

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