I think Input Boxes should be available in Scratch. Then you could type stuff in, submit it and the program does something. You should also be able to set a password type so hello in your box would appear as ***** or hello if password mode was unset. You would need to be able to type in if boxes for stuff like
[blocks]<if><( <{ Text box name }> <=> hello )>
<say[ Hello to you too. ]>
<end>[/blocks]
What do you think?
Last edited by Bingo_324 (2007-08-21 04:00:48)
Offline
Yea text boxes in scratch definitely would help alot. Along with string variables.
Offline
Thanks for the support. String variables for the input boxes would be automatically created but for other things yea, good idea. It should be an option.
[Make new variable]
[Type: ]
[Number Variable]
[String Variable ]
Offline
Yeah, I'd really like an input thing too, like in Java, so I could make a chatting program, booleans would be great too
Offline
I thought about whether I would like booleans or not. Frankly, I like the old "c" solution best---any numeric variable can be used where a Boolean expression is wanted, with 0 meaning false and non-zero meaning true. This avoids the need to create a new type, and allows having ordinary variables set to 1 and 0 as booleans. It annoys me a little that scratch insists on using x > 0 in tests, rather than just x. (Particularly for variables like "treasure found" I would like to have tests like "wait until treasure found".)
Offline
How about...
[blocks]<wait until><( <{ Treasure found }> <=> true )>
<say[ You found it![/blocks]
Offline
For boolean variables, the "=true" test is redundant. In languages that have booleans, using ==true and ==false is generally a sign of a beginning programmer, who doesn't understand how to use booleans.
When one does not have booleans, one can use ordinary variables with =0 and >0, but that is not quite as elegant.
Offline