To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 716
715  |  717
Subject: 
Re: NBC arrays
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sat, 5 May 2007 13:29:38 GMT
Viewed: 
18409 times
  
In lugnet.robotics.nxt, John Hansen wrote:
Aside from a bug in the OP_REPLACE operation which breaks support for
multi-dimensional arrays (nested arrays) and aside from the restriction that you
not use the input array as the output array in OP_REPLACE I would say that the
array operations are general.

I misspoke here.  It is not OP_REPLACE which requires that the output array be
different from the input array.  Using the same arrays as input and output with
OP_REPLACE, in fact, is quite normal and usual.  I was actually thinking of
OP_ARRBUILD which must not include the output array as any of its inputs since
it allocates the new size for the output array before it copies any of the data
from its input sources (which means the data in the array would be lost if it is
used as one of the input sources).

Sorry for the incorrect information.

John Hansen



Message has 1 Reply:
  Re: NBC arrays
 
Thank you for the valuable first-hand information. It is a pitty there is no byte-code instruction to copy a part of an array somewhere to a middle of another array (so that one does not have to index and replace element-by-element or allocate a new (...) (17 years ago, 13-May-07, to lugnet.robotics.nxt)

Message is in Reply To:
  Re: NBC arrays
 
(...) Perhaps the executable file and bytecode reference PDF explains arrays in a way that would complement the description in the NBC manual. The firmware source code is also a good source of information about how arrays work. (...) The firmware (...) (17 years ago, 4-May-07, to lugnet.robotics.nxt)

4 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