Discuss Scratch
- Paddle2See
-
Scratch Team
1000+ posts
CalcuBlock
Ah, but note that the quote you have grabbed is from a suggestion that Scratch recognize that a math expression is being used purely from context. I am not rejecting the idea of having a block like this that explicitly calls for a math calculation. I still think such a block would be difficult to implement (primarily for the error handling) and have limited usefulness - so it's unlikely to be implemented. But I wouldn't rule it out categorically.No need.You are asking that Scratch recognize that you want the string of characters made up of numbers and operator characters be recognized as a math expression and evaluated. That's asking a lot. That's not how Scratch does math - it uses the operator blocks. Evaluating a character string as a math expression would be a new Scratch feature (and would probably require it's own block) that is actually pretty complicated since it is very easy to make a character string that is not a valid math expression, such as “1–1”. So that would have to be checked and handled. And after all that - I'm having trouble coming up with use cases. What kind of project would use this feature? Maybe a calculator simulation - which is not a very common class of projects.
I don't know if there is enough demand for this feature to make it worth the resources required to implement it.
Last edited by Paddle2See (Sept. 29, 2024 12:25:32)
- Elijah999999
-
Scratcher
1000+ posts
CalcuBlock
Ah, but note that the quote you have grabbed is from a suggestion that Scratch recognize that a math expression is being used purely from context. I am not rejecting the idea of having a block like this that explicitly calls for a math calculation. I still think such a block would be difficult to implement (primarily for the error handling) and have limited usefulness - so it's unlikely to be implemented. But I wouldn't rule it out categorically.I see.
- starlightsparker
-
Scratcher
1000+ posts
CalcuBlock
This may confuse newer scratchers—I believe a better solution may be the ability to add more inputs in one operator.
- TheCreatorOfUnTV
-
Scratcher
1000+ posts
CalcuBlock
This may confuse newer scratchers—I believe a better solution may be the ability to add more inputs in one operator.That would make this topic a duplicate of one of my topics.
- starlightsparker
-
Scratcher
1000+ posts
CalcuBlock
That would make this topic a duplicate of one of my topics.I was referring to +, -, /, <, >, and * operators specifically, and the ability to not only be able to create, for example, “1 / 1 / 1” but also “1 / 2 * 3” and the like.
- DangerPuppy10
-
Scratcher
1000+ posts
CalcuBlock
Ah, but note that the quote you have grabbed is from a suggestion that Scratch recognize that a math expression is being used purely from context. I am not rejecting the idea of having a block like this that explicitly calls for a math calculation. I still think such a block would be difficult to implement (primarily for the error handling) and have limited usefulness - so it's unlikely to be implemented. But I wouldn't rule it out categorically.I see.

- Albus2023
-
Scratcher
100+ posts
CalcuBlock
But if bulky scripts is what you care about why don’t you just make a block that isn’t thick??? Like just ask scratch to change the bulk multiplication settings!?
([6] + ([5] / [8]))
Last edited by Albus2023 (Sept. 29, 2024 19:50:45)
- DangerPuppy10
-
Scratcher
1000+ posts
CalcuBlock
But if bulky scripts is what you care about why don’t you just make a block that isn’t thick??? Like just ask scratch to change the bulk multiplication settings!?But when you add to many reports onto of each-other you get this:([6] + ([5] / [8]))
(((((((pick random (((((((length of <<> or <>>) - (0)) + (0)) * (0)) / (0)) - (0)) - (0)) to (10)) - (0)) / (0)) * (0)) * (0)) + (0)) - (0))
- MillionOfficial
-
Scratcher
500+ posts
CalcuBlock
snip“:: category” next to a block. You want it to be operators, so use “:: operators”.
(I forgot how to color scratchblocks)
And it can be in the Operators category.
For motion, “:: motion”, for looks, “:: looks” and so on.
[scratchblocks]
(solve () :: operators)
[/scratchblocks]
- cookieclickerer33
-
Scratcher
1000+ posts
CalcuBlock
Support, mettaprogramming would be so much easier
- cookieclickerer33
-
Scratcher
1000+ posts
CalcuBlock
But if bulky scripts is what you care about why don’t you just make a block that isn’t thick??? Like just ask scratch to change the bulk multiplication settings!?That’s not how scratch works. That’s not how blockly works.([6] + ([5] / [8]))
To do this they need to rewrite scratch from the ground up with no baseline
- LaughabIe
-
Scratcher
100+ posts
CalcuBlock
i have mixed opinions on this… on one hand, yeah! organized code is always a good thing. i don’t like scrolling through a massive operator block trying to fix the issue that lies within it. but are massive operators a problem that really needs a new solution? rarely will you actually have to deal with this, and when you do it’s entirely possible to optimize it so it isn’t nearly as messy.
you also have to consider how this would even calculate math equations very well. how would it differentiate a negative symbol from a subtraction symbol, like how calculators handle it?
you also have to consider how this would even calculate math equations very well. how would it differentiate a negative symbol from a subtraction symbol, like how calculators handle it?
calculate [-2 - 4]::operators reporter
Last edited by LaughabIe (Sept. 30, 2024 21:41:27)
- AliMASTER430258
-
Scratcher
100+ posts
CalcuBlock
you also have to consider how this would even calculate math equations very well. how would it differentiate a negative symbol from a subtraction symbol, like how calculators handle it?Easy. you use these: | .calculate [-2 - 4]::operators reporter
Ex.
calculate [-2 |- 4]::operators reporter
- LaughabIe
-
Scratcher
100+ posts
CalcuBlock
Easy. you use these: | .that symbol is generally used for absolute values (or this)
Ex.calculate [-2 |- 4]::operators reporter
([abs v] of ())honestly even if there was extended documentation for this suggestion, this would be confusing for ANY scratcher, not just inexperienced ones.
- cookieclickerer33
-
Scratcher
1000+ posts
CalcuBlock
i have mixed opinions on this… on one hand, yeah! organized code is always a good thing. i don’t like scrolling through a massive operator block trying to fix the issue that lies within it. but are massive operators a problem that really needs a new solution? rarely will you actually have to deal with this, and when you do it’s entirely possible to optimize it so it isn’t nearly as messy.Here’s the cool part about negative numbers. The - symbol used to denote them actually is a shortening of “0-“
you also have to consider how this would even calculate math equations very well. how would it differentiate a negative symbol from a subtraction symbol, like how calculators handle it?calculate [-2 - 4]::operators reporter










