Discuss Scratch
- MushroomMan99
- Scratcher
100+ posts
letters () to () of () block
I am suggesting a block like this
(letters (1) to (3) of [world])
when green flag clicked
if <(language) = [English ]> then
say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then
say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then
say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then
say [Todo es fabuloso!] for (2) secs
end
- IR_pickle
- Scratcher
18 posts
letters () to () of () block
Good idea! Definitely could come in handy for a word game or something.
When gf clicked
forever
wait until (I am hungry)
eat (1) pickle
end
- Blueinkproductions
- Scratcher
1000+ posts
letters () to () of () block
+1
Generation 2: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
____ _____ _______
| \ | | | | | |\ | | /
|___/ | | | |__ | | \ | |/
| \ | | | | | | \ | |\
| | | | | | | | \ | | \
|___/ L____ \___/ |_____ ___|___ | \| | \
PRODUCTIONS
Here's a hint: support = support.
<shameless self promotion>follow me! follow me! follow me! love my stuff! love my stuff! love my stuff! follow me! love my stuff! remix my stuff! follow me! follow me! </shameless self promotion>
- MushroomMan99
- Scratcher
100+ posts
letters () to () of () block
If there is a workaround please can you tell me it
when green flag clicked
if <(language) = [English ]> then
say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then
say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then
say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then
say [Todo es fabuloso!] for (2) secs
end
- Zro716
- Scratcher
1000+ posts
letters () to () of () block
it's not that hard to workaround
but I support anyways
edit: fixed
define letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (join (return)(letter (letter) of (string)))
change [letter v] by (1)
end
but I support anyways
edit: fixed
Last edited by Zro716 (Aug. 4, 2014 13:48:56)
As a long time Scratcher, I have found new meaning to the name “Scratch”: for me, it means to “scratch that itch”, to come back again and again to realize new ideas in this toy language, even when I'm capable of creating my projects in real programming languages years later. It's a friend that helped me to pursue programming and get me to enjoy its fruit. I'm certain many others who have walked this path as well have grown fond of its importance in their life.
- epicsandwich123
- Scratcher
100+ posts
letters () to () of () block
support.
by the way thanks for supporting my topic
by the way thanks for supporting my topic
ever wanted some awesome sening blocks? http://scratch.mit.edu/discuss/topic/45738/
how about copying and pasting? http://scratch.mit.edu/discuss/topic/41980/
#sorry, but games coming soon. check my old account, awesomegames123!
- MushroomMan99
- Scratcher
100+ posts
letters () to () of () block
Thanks. That helps it's not that hard to workarounddefine letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (letter (letter) of (string))
change [letter v] by (1)
end
but I support anyways
when green flag clicked
if <(language) = [English ]> then
say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then
say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then
say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then
say [Todo es fabuloso!] for (2) secs
end
- lalala3
- Scratcher
100+ posts
letters () to () of () block
it's not that hard to workarounddefine letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (join (return) (letter (letter) of (string))) //Fixed
change [letter v] by (1)
end
but I support anyways
Last edited by lalala3 (Aug. 3, 2014 19:23:51)
- MushroomMan99
- Scratcher
100+ posts
letters () to () of () block
How do you make a reporter out of this. What's the workaround forit's not that hard to workarounddefine letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (join (return) [letter (letter) of (string)]) //Fixed
change [letter v] by (1)
end
but I support anyways
say (letters (1) to (3) of [world]) for (2) secs
when green flag clicked
if <(language) = [English ]> then
say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then
say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then
say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then
say [Todo es fabuloso!] for (2) secs
end
- lalala3
- Scratcher
100+ posts
letters () to () of () block
How do you make a reporter out of this. What's the workaround forit's not that hard to workarounddefine letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (join (return) [letter (letter) of (string)]) //Fixed
change [letter v] by (1)
end
but I support anywayssay (letters (1) to (3) of [world]) for (2) secs
letters (1) to (3) of [world]Honestly, though, that's why we need custom reporter blocks in general.
say (return) for (2) secs
Last edited by lalala3 (Aug. 3, 2014 19:32:19)
- MushroomMan99
- Scratcher
100+ posts
letters () to () of () block
Thanks. I used this in my project http://scratch.mit.edu/projects/25277971/How do you make a reporter out of this. What's the workaround forit's not that hard to workarounddefine letters (a) thru (b) of [string]
set [return v] to []
set [letter v] to (a)
repeat (((b) - (a)) + (1))
set [return v] to (join (return) [letter (letter) of (string)]) //Fixed
change [letter v] by (1)
end
but I support anywayssay (letters (1) to (3) of [world]) for (2) secsletters (1) to (3) of [world]Honestly, though, that's why we need custom reporter blocks in general.
say (return) for (2) secs
when green flag clicked
if <(language) = [English ]> then
say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then
say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then
say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then
say [Todo es fabuloso!] for (2) secs
end
- Paddle2See
- Scratch Team
1000+ posts
letters () to () of () block
I get a bit annoyed when I see really short responses to suggestions. Simply saying you support or don't (or are indifferent - as in this case) is not really a discussion of the merits of the suggestion. Please take the time to support your opinions with some argumentsThen don't post. Indifferent.
As for the suggestion: I like to do text manipulation projects at times and I would love to have this block. Sure, there are ways to work around it - but they are not very clean. However, I also recognize that Scratch is intended to be simple to learn - and one way to keep it simple is to limit the number of blocks. So there have to be some very compelling benefits before a new block is added to the pallet.
Scratch Team Member, kayak and pickleball enthusiast, cat caregiver.
This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
(credit to Za-Chary)
;
- astro-mechanic
- Scratcher
500+ posts
letters () to () of () block
Ah yes, slicing. Unfortunate for the undefined behaviors here, such as invalid indexes. Will the starting index be inclusive and the ending index be exclusive, as in Python, such that end - start = length? Or will both be inclusive?
A text reverse block would go well with this.
A text reverse block would go well with this.
sign here
emperor of shiny things
emperor of shiny things