Discuss Scratch

Tbtemplex97
Scratcher
100+ posts

More string manipulation

Currently, string manipulation blacks are very limited but have complicated workarounds so I suggest blocks such as letters through of

Star.Scape v0.3 An MMO Space Adventure Game
turkey3
Scratcher
1000+ posts

More string manipulation

But it's the complicated workarounds that make us think, and isn't that what Scratch is all about? Problem solving and mind training

griffpatch
Scratcher
100+ posts

More string manipulation

turkey3 wrote:

But it's the complicated workarounds that make us think, and isn't that what Scratch is all about? Problem solving and mind training

I completely agree with that in principle, however if you want to manipulate a megabyte of string data, having to do it character by character and the memory implications of rebuilding strings in this way is both very slow and inefficient. It could also be argued there are more important aspects of your programs that you want to spend the effort problem solving than string manipulation? - I for one would say we need more string manipulation blocks (substring and indexof)… pretty please
ProdigyZeta7
Scratcher
1000+ posts

More string manipulation

There's some who are capable of workarounds, but there's the majority who are not yet that advanced. Besides, Scratch needs to improve.

Zeta Seal of Approval!



technoboy10
Scratcher
1000+ posts

More string manipulation

@griffpatch +1
I support.

trans rights are human rights
0bitasy0
Scratcher
77 posts

More string manipulation

This would be great, especially with cloud data holding strings soon.
+1
thebriculator
Scratcher
100+ posts

More string manipulation

Maybe one of these or custom reporters?

480X360 when I don't even need it…



kola2
Scratcher
100+ posts

More string manipulation

A block like this could be pretty nice to have :
[Replace letter "Number" of "Variable" with "Letter"]

I support this tread
+1

Last edited by kola2 (June 27, 2013 16:20:07)





griffpatch
Scratcher
100+ posts

More string manipulation

A reported that returns the number 3 if you do this:

Find String “am” in “I am griffpatch”

And a reporter that return “am” if you do this:

Substring “I am griffpatch” from “3” to “4”

Last edited by griffpatch (June 28, 2013 12:03:23)

curiouscrab
Scratcher
500+ posts

More string manipulation

Interesting ideas. I know lots of Scratch Modifications include these new blocks because they weren't in Scratch, but one of the biggest problems is people make the mistake of replacing instead of adding. I know in Bingo 2.0, LS97 replaced (letter () of ) with (letters () - () of ) and I was trying to make a script and couldn't because I only needed one letter and I was putting things like (letters (1) - (1) of ) which comes up as an error. So basically, the moral of the story is be careful what you wish for and/or be careful when modifying Scratch.
thebriculator
Scratcher
100+ posts

More string manipulation

griffpatch wrote:

A reported that returns the number 3 if you do this:

Find String “am” in “I am griffpatch”

And a reporter that return “am” if you do this:

Substring “I am griffpatch” from “3” to “4”
The second you have there is like the first one I have above.



curiouscrab
Scratcher
500+ posts

More string manipulation

thebriculator wrote:

griffpatch wrote:

A reported that returns the number 3 if you do this:

Find String “am” in “I am griffpatch”

And a reporter that return “am” if you do this:

Substring “I am griffpatch” from “3” to “4”
The second you have there is like the first one I have above.
I think griffpatch's version seems a little more professional/technical, which can be both good or bad.
griffpatch
Scratcher
100+ posts

More string manipulation

curiouscrab wrote:

thebriculator wrote:

griffpatch wrote:

A reported that returns the number 3 if you do this:

Find String “am” in “I am griffpatch”

And a reporter that return “am” if you do this:

Substring “I am griffpatch” from “3” to “4”
The second you have there is like the first one I have above.
I think griffpatch's version seems a little more professional/technical, which can be both good or bad.

You are quite right, and perhaps yours is worded better for use in scratch… I wanted to just show two blocks that both add functionality that is missing from Scratch, but that work well together and in themselves are enough to do most string related tasks (except perhaps adding a ‘to uppercase’ and ‘to lowercase’?

Powered by DjangoBB