Spinning my wheels on the Spin language.
Richy_Rich
Posts: 5
Hello,
I have been trying to find some reference material for Spin.· The language reference
in the handbook does not include most of the statements I have come across in the
Demo objects.
For example, I caannot find anything about text.xxxxx anywhere in the book or elsewhere
for that matter. Is there a reference somewhere defining the different methods ( I think
that's what I mean ) such as text.start, .out, .str etc. ?
What I have seen reminds me of C from along time ago.· Is it the same command set and
format as C?
Thanks for any help,
Richard
I have been trying to find some reference material for Spin.· The language reference
in the handbook does not include most of the statements I have come across in the
Demo objects.
For example, I caannot find anything about text.xxxxx anywhere in the book or elsewhere
for that matter. Is there a reference somewhere defining the different methods ( I think
that's what I mean ) such as text.start, .out, .str etc. ?
What I have seen reminds me of C from along time ago.· Is it the same command set and
format as C?
Thanks for any help,
Richard
Comments
Read chapter 3 and you will then understand that when you see:
text.start
it is running the start method within an object called text. Now the object is some code written by you or someone else, and it will be stored in a spin file, in the program where you see text reference look near the top and you will see something like
That creates an instance of the object tv_text called text though you could have called it anything you wanted.
Look in the tv_text.spin file and click the documentation radio button to see what other functions are available and how to use them.
Graham
I just got to this section in the manual. It really IS worth reading the manual.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I can handle complexity.. It's the SIMPLE things that confound me.
The Dynaplex Network
http://www.thedynaplex.org
Beyond the advice of reading chapter 3, anything you see that is xxxx.yyyy is a function call into an object. The dowload-able documents do not cover the contents·released·objects. Directions on the use of functions within the object are provided in the object itself in the form of code documentation and comments. Part of my job (this is my second day) will be to flesh in some documentation on some of the objects. It will be a little while before I will start on this and I will likely start with the more complex and fairly static objects (such as graphics.spin) first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
That will make all the difference. Are you also commenting the code more verbosely (that word is catching)? I found that I was hindered in learning at the start because I didn't know enough spin to understand what the code was doing on a basic level, even before looking at the functions of the objects. In some ways some of the code it too good, they use some neat tricks the beginner might struggle to understand at first.
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
What format would you use for documenting these objects? A file somewhere on the Parallax site? Or perhaps a thread in this forum?
Thanks in any case,
J
Add my Hurray!!.
Any words of wisdom about graphics will be more than welcome.
Whish you the best.
Like Graham, I too have found it hard -- though not impossible -- to undertsand what's possible, and it's clearly going to make newbies' (like me) lives easier with fully documented objects. I presume that you'll be putting the documentation inside the objects' spin files, rather than creating a new document somewhere
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheers,
Simon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.