Discuss Scratch

MushroomMan99
Scratcher
100+ posts

letters () to () of () block

I am suggesting a block like this
(letters (1) to (3) of [world])
IR_pickle
Scratcher
18 posts

letters () to () of () block

Good idea! Definitely could come in handy for a word game or something.
TheHockeyist
Scratcher
1000+ posts

letters () to () of () block

Indifferent.
Blueinkproductions
Scratcher
1000+ posts

letters () to () of () block

+1
Deerleg
Scratcher
1000+ posts

letters () to () of () block

Yes! Though I think there's a workaround.
MushroomMan99
Scratcher
100+ posts

letters () to () of () block

If there is a workaround please can you tell me it
Deerleg
Scratcher
1000+ posts

letters () to () of () block

Join letter one to letter two and letter three and so on.
(Scratchblocks will not cooperate with me today.)
Zro716
Scratcher
1000+ posts

letters () to () of () block

it's not that hard to workaround
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)

epicsandwich123
Scratcher
100+ posts

letters () to () of () block

support.

by the way thanks for supporting my topic
Thepuzzlegame
Scratcher
1000+ posts

letters () to () of () block

Support
MushroomMan99
Scratcher
100+ posts

letters () to () of () block

Zro716 wrote:

it's not that hard to workaround
define 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
Thanks. That helps
lalala3
Scratcher
100+ posts

letters () to () of () block

TheHockeyist wrote:

Indifferent.
Then don't post.
lalala3
Scratcher
100+ posts

letters () to () of () block

Zro716 wrote:

it's not that hard to workaround
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))) //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

lalala3 wrote:

Zro716 wrote:

it's not that hard to workaround
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)]) //Fixed
change [letter v] by (1)
end

but I support anyways
How do you make a reporter out of this. What's the workaround for
say (letters (1) to (3) of [world]) for (2) secs
lalala3
Scratcher
100+ posts

letters () to () of () block

MushroomMan99 wrote:

lalala3 wrote:

Zro716 wrote:

it's not that hard to workaround
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)]) //Fixed
change [letter v] by (1)
end

but I support anyways
How do you make a reporter out of this. What's the workaround for
say (letters (1) to (3) of [world]) for (2) secs
letters (1) to (3) of [world]
say (return) for (2) secs
Honestly, though, that's why we need custom reporter blocks in general.

Last edited by lalala3 (Aug. 3, 2014 19:32:19)

MushroomMan99
Scratcher
100+ posts

letters () to () of () block

lalala3 wrote:

MushroomMan99 wrote:

lalala3 wrote:

Zro716 wrote:

it's not that hard to workaround
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)]) //Fixed
change [letter v] by (1)
end

but I support anyways
How do you make a reporter out of this. What's the workaround for
say (letters (1) to (3) of [world]) for (2) secs
letters (1) to (3) of [world]
say (return) for (2) secs
Honestly, though, that's why we need custom reporter blocks in general.
Thanks. I used this in my project http://scratch.mit.edu/projects/25277971/
Paddle2See
Scratch Team
1000+ posts

letters () to () of () block

lalala3 wrote:

TheHockeyist wrote:

Indifferent.
Then don't post.
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 arguments

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.
stickfiregames
Scratcher
1000+ posts

letters () to () of () block

Support since other programming languages can do this. Also the workaround is very slow as I noticed when I used it to make a cloud encoder.
lalala3
Scratcher
100+ posts

letters () to () of () block

stickfiregames wrote:

Support since other programming languages can do this. Also the workaround is very slow as I noticed when I used it to make a cloud encoder.
Even with the “no screen refresh” thing disabled? Wow.
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.

Powered by DjangoBB