I think that not being able to have functions with arguments can be limiting sometimes. The message thing helps a bit, but you can't attach any arguments to it. There should be a block that has something like "send message ___ with notes ___, ___, ___". The receiving end would be "when I receive message ___ and ___, ___, ___" or something. I don't know how to work with the returned value. You could work around this by using variables to store arguments and then sending a message and having the thing receiving the message change the variables. This is kind of time-consuming, though. It would be much easier to just type stuff into a block.
Offline
Using lists can make this happen this right now try , the join length etc and the list and variable blocks can be added in the broadcast function then u can simply type the output or use again the same method for the output
Offline
OR you could do this:
[blocks]
main script
<set{ argument1 }to( 4 )>
<set{ argument2 }to( 4 )>
<broadcast[ myfunction ]and wait c>
function
<when I receive[ myfunction }>
(use variables argument1 and 2)
Once the function is done, the main script is done. In this way you can pretend to have functions and arguments/parameters.
[/blocks]
Offline
Yeah, other languages have lists, but they also have user defined functions, so lists don't make functions obsolete. Adding functions would save a ton of time and be better practise for real programming.
Last edited by archmage (2009-11-01 15:38:05)
Offline
Lists and arrays are the same thing. Scratch just like to put things into simple terms.
Offline