Another Array Question: Passing the address
bdickens
Posts: 110
If I have one object with a VAR Servo[noparse][[/noparse]10] and later in the code, I call an object with this NewCall(@Servo[noparse][[/noparse]5) I rather presume that the servo gets the address of the 6th element in the array. Is that true ?
By way of explanation; I travel a lot and the prop hardware usually gets me strange looks at airport security, so I end up doing a lot of software work during the week and hardware work on the weekends. I'd like to test it all and find out myself, but thats just too long. So I apologize for a lot of seemingly basic questions.
Thanks
Post Edited (bdickens) : 11/4/2008 5:54:32 PM GMT
By way of explanation; I travel a lot and the prop hardware usually gets me strange looks at airport security, so I end up doing a lot of software work during the week and hardware work on the weekends. I'd like to test it all and find out myself, but thats just too long. So I apologize for a lot of seemingly basic questions.
Thanks
Post Edited (bdickens) : 11/4/2008 5:54:32 PM GMT
Comments
That's an interesting one. I also travel frequently and tend to carry a prop proto-board in my carry on. Mine has a 2x16 LCD and a USB lead wired to it and I carry it in a small plastic lunchbox with a clip-on lid.
I've only been asked once and then I pointed out the USB cable and told them it was a naked usb widget. Got waved straight through.
I use the USB cable to power it when I'm on a flight, but I think having it attached permanently tends to give them something they understand to look at rather than a board with nasty looking electronics on it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pull my finger!
That's the way it works. Then you easily access the var in the obj as Long[noparse][[/noparse]Servo(5)]
Use a [noparse][[/noparse] (insert space) Number ] to avoid crazy text when using brackets, even when posting code I think it is required to insert the space before the number.
* In order to make the index items show up in my post I had to place the second bracket after a single quote. But now you see single quotes that are not supposed to be part of the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Marc Gebauer) : 11/5/2008 11:03:59 PM GMT