Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch needs a SubString and Loc functions
- BoltBait
-
1000+ posts
Scratch needs a SubString and Loc functions
The Scratch language is missing two very important string functions: SubString and Loc.
I have created two projects to demonstrate these functions:
and
Scratch Team, I know these have been requested before… But, it has been a LONG time since the language has been updated with new blocks. Please consider adding these two functions into the language. Thanks!
I have created two projects to demonstrate these functions:
https://scratch.mit.edu/projects/154872191/
and
https://scratch.mit.edu/projects/154881971/
Scratch Team, I know these have been requested before… But, it has been a LONG time since the language has been updated with new blocks. Please consider adding these two functions into the language. Thanks!
Last edited by BoltBait (April 25, 2018 04:58:01)
- iamunknown2
-
1000+ posts
Scratch needs a SubString and Loc functions
While I support the first suggestion, I'm not so sure about the second one - it would create ambiguity. Does the second block return the location of the first letter or the last letter? Or would it return an entire list?
- BoltBait
-
1000+ posts
Scratch needs a SubString and Loc functions
You see, that's why I made a project to demonstrate the functionality. No more ambiguity.
(Plus, if you'd ever used ANY other programming language, you'd already be familiar with these two functions.)
(Plus, if you'd ever used ANY other programming language, you'd already be familiar with these two functions.)
- iamunknown2
-
1000+ posts
Scratch needs a SubString and Loc functions
I'm talking about Scratch newbies - that is, new Scratchers who have no prior experience in any programming language. You see, that's why I made a project to demonstrate the functionality. No more ambiguity.
(Plus, if you'd ever used ANY other programming language, you'd already be familiar with these two functions.)
- WolfCat67
-
1000+ posts
Scratch needs a SubString and Loc functions
I didn't know you were still active! :P
For the first suggestion, I'm afraid that's a duplicate.
For the second suggestion, I think that's a great idea! I could see this being used to separate certain words from others in different ways. And as you've shown, the workaround is not simple at all. Support for that one.
For the first suggestion, I'm afraid that's a duplicate.
For the second suggestion, I think that's a great idea! I could see this being used to separate certain words from others in different ways. And as you've shown, the workaround is not simple at all. Support for that one.
Last edited by WolfCat67 (June 10, 2017 14:28:44)
- PullJosh
-
1000+ posts
Scratch needs a SubString and Loc functions
I'd have to agree with iamunknown2. The substring block is pretty intuitive even for new users, and would be incredibly helpful. The location block is also useful, but much less intuitive, so it might not be a great addition (considering Scratch's target audience).
- BoltBait
-
1000+ posts
Scratch needs a SubString and Loc functions
considering Scratch's target audience
Worst argument ever.
- jromagnoli
-
1000+ posts
Scratch needs a SubString and Loc functions
True… I think the substring block is a duplicate.considering Scratch's target audience
Worst argument ever.
Last edited by jromagnoli (April 11, 2017 00:41:58)
- BoltBait
-
1000+ posts
Scratch needs a SubString and Loc functions
I think the substring block is a duplicate.
I know.
That's why I originally said…
Scratch Team, I know these have been requested before…
- iamunknown2
-
1000+ posts
Scratch needs a SubString and Loc functions
Well, that's actually part of the design goals I think Lightnin posted somewhere here.considering Scratch's target audience
Worst argument ever.
- ilikelegos
-
100+ posts
Scratch needs a SubString and Loc functions
Support for substring but maybe not location.
The main downside of either is currently not having them forces new scratchers to learn really important concepts (if they're serious about getting into coding). I probably wouldn't be where I am if we had that functionality. That's a strange argument (Less functionality = better… how???), but may be worth something.
Buuut I agree both would be extremely handy.
The main downside of either is currently not having them forces new scratchers to learn really important concepts (if they're serious about getting into coding). I probably wouldn't be where I am if we had that functionality. That's a strange argument (Less functionality = better… how???), but may be worth something.
Buuut I agree both would be extremely handy.
Last edited by ilikelegos (June 10, 2017 06:54:17)
- kenny2scratch
-
500+ posts
Scratch needs a SubString and Loc functions
Then why did you make another topic for them? If you know it's been requested before, just go to the original thread and add info there (or if it's closed go to the next oldest one).I think the substring block is a duplicate.
I know.
That's why I originally said…Scratch Team, I know these have been requested before…
- XenoCoding
-
100+ posts
Scratch needs a SubString and Loc functions
Support for both of these. The other day I was thinking about how strange it was that Scratch didn't have a substring block, and how desperately I wanted one. I hope these blocks get implemented in 3.0
- Daniel_The_Guy
-
29 posts
Scratch needs a SubString and Loc functions
Support! The Scratch language is missing two very important string functions: SubString and Loc.
I have created two projects to demonstrate these functions:https://scratch.mit.edu/projects/154872191/
andhttps://scratch.mit.edu/projects/154881971/
Scratch Team, I know these have been requested before… But, it has been a LONG time since the language has been updated with new blocks. Please consider adding these two functions into the language. Thanks!
I didn't know you were still active! :PYes we already have
For the first suggestion, I'm afraid that's a duplicate.
For the second suggestion, I think that's a great idea! I could see this being used to separate certain words from others in different ways. And as you've shown, the workaround is not simple at all. Support for that one.
but we don't have what @BoltBait said,
I'd have to agree with iamunknown2. The substring block is pretty intuitive even for new users, and would be incredibly helpful. The location block is also useful, but much less intuitive, so it might not be a great addition (considering Scratch's target audience).
Yes… I agree.considering Scratch's target audience
Worst argument ever.
- thebrandon
-
1 post
Scratch needs a SubString and Loc functions
I would like to voice my support for both functions, especially the substring function.
Last edited by thebrandon (July 16, 2017 20:44:55)
- badgebry000
-
24 posts
Scratch needs a SubString and Loc functions
None of these require new scratchers to learn about them, as they will simply use what they know.
- elimerl
-
2 posts
Scratch needs a SubString and Loc functions
None of these require new scratchers to learn about them, as they will simply use what they know.Yeah, they don't have to use some crazy block. Maybe if it's only available for Advanced Scratchers?
- bybb
-
1000+ posts
Scratch needs a SubString and Loc functions
I'll have to disagree with you there, imagine this. I'm not so sure about the second one - it would create ambiguity. Does the second block return the location of the first letter or the last letter? Or would it return an entire list?
It will return 9 because starting at position 9 the string “i” appears, so based on that
Should also return 9 because starting at position 9 the string “ijklmno” appears.
When you ask for the location of something, you want where it starts, not where it ends.
- kieranblackley
-
500+ posts
Scratch needs a SubString and Loc functions
The Scratch language is missing two very important string functions: SubString and Loc.
I have created two projects to demonstrate these functions:https://scratch.mit.edu/projects/154872191/
andhttps://scratch.mit.edu/projects/154881971/
Scratch Team, I know these have been requested before… But, it has been a LONG time since the language has been updated with new blocks. Please consider adding these two functions into the language. Thanks!
I can see a great use for these blocks. For example: If I needed only part of a string I could use this block. Let's say I was importing something like a database into scratch and it came out the wrong way. For example like this:
/hello there./
I only needed the hello there and not the slashes. I could delete the slashes using the substring block.
Great idea! Support.
- NitroTyper3000
-
100+ posts
Scratch needs a SubString and Loc functions
Support! These would make my projects run much faster
- Discussion Forums
- » Suggestions
-
» Scratch needs a SubString and Loc functions