Help finding something in manual.
![TC](https://forums.parallax.com/uploads/userpics/960/n1TI3FP1FAD2X.jpg)
Hello all, I can not seem to find in the prop·manual (v1.0) any info how a RESULT varable can·go from one object to another.
Thanks
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Thanks
TC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Comments
PS. I payed for the printed manual. I had to download the manual just to use search.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
' example routine in math object
Pub Sum(x,y) | z
z := x + y
return z
OR
Pub Sum(x,y) : z
z := x + y
' z is automatically returned when defined as it is
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters- Close out on Adapters!
Southern Illinois University Carbondale, Electronic Systems Technologies
Normaly you write
Has nothing to do with objects...
__________________________________________
{ Main.spin }
OBJ
· VALUE:"other"
PUB DO_SOMETHING
· TEMP := < WHATEVER from Other.spin >
___________________________________________
{ Other.spin }
PUB GET_VALUE : Other_value
· Other_Value := < WHATEVER >
I hope this explains what I am trying to say there are two files. one called " main.spin ". and another file called " Other.spin". Other.spin does somthing to get a value(varable). and puts it in to " Temp " in Main.spin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
This is very good style, and called "using a GETter"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!
Steve
Post Edited (Duffer) : 8/23/2007 2:14:12 AM GMT
The manual's examples tend to set up blinking led's that just DO something but seldom, if ever, return any information. You have to read through most of them to catch ANY glimpse of passing information back to their callers especially when you're working the Object examples. I think the only example is a Success bit.
A good example, ie short and sweet, is the keyboard_demo.spin. In it you can see how easily a keypress is passed back to the topmost and sent just as quickly to the tv output method.
ps dS:·· "GETter" is not to be found anywhere in the manual either. If you're going to invent jargon, please take the time to determine if your listener is up to speed or give a guiding context.
Post Edited (Fred Hawkins) : 8/23/2007 2:09:49 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
We all make mistakes when we are young………That’s why paste is edible!