To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 93
92  |  94
Subject: 
variables and spybot
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Mon, 9 Sep 2002 07:48:15 GMT
Viewed: 
5237 times
  
Hello John.

Thanks again for the info about IR related syntax .
With your information I wrote a small target finding related program.
The bot produces four different sounds depending on the distance between the
bot and the controller.
I used the constants cNowhere,cAnywhere,Cthere and cHere (value 0-1-2-3) to
compare with the new variable  distance.
This variable distance get its value from: distance = world[nIndex,iRange]
as you described.
The program works fine ( I used BrickCC to compile and watch it !), but
still I do not really understand it.
So I have some more questions, if you do not mind……..
As a newbee I was wondering about the use of Brackets [ ] in the world
subroutine instead of the normal ( ) , what is the difference between both
systems ?
Also the use of nIndex is not very clear, is this a dummy variable ?
Watching the value of a variable in the watch window (BrickCC) I discovered
that without the use of #include “globals.h” the first variable used by the
bot or BrickCC is var 31 every next variable used gets a lower number. Var
30 , var 29 and so on.
With the use of the globals.h variable places are occupied by global
variables from the globals.h file and the local variables from my program
are placed in a new variable location.
Question: is there a way to point to a special variable location when you
use local variables ?
In your last message you used syntax like n ^ and n+ and n- , has this any
relation with my question ?
Last question about iShortID, I get the value 3, is this value the number of
the secure channel between the bot and the controller ?
Thanks in advance John, cheers André



Message has 1 Reply:
  Re: variables and spybot
 
(...) For reasons unknown to me the designers of MindScript decided to use array property notation much like that used in Delphi to implement various features in the Spybot firmware. world should not be thought of as a subroutine. It is a (...) (22 years ago, 9-Sep-02, to lugnet.robotics.spybotics)

3 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