So, I decided to make a project that can convert characters to their lowercase/uppercase forms without using JavaScript. I already know that someone made something similar, but this is more effective.
CONVERT () TO ()
(convert [world] to [lowercase v] :: operators)
In JavaScript:
(call (JavaScript function \\( [text]@delInput@addInput \\) \\{ [return text.toLowerCase()] \\} :: operators) with inputs: [Hello World!]@delInput@addInput :: control)
Features:
Supports Latin Alphabet
(convert [abcdefghijklmnopqrstuvwxyz] to [uppercase v] :: operators) // ABCDEFGHIJKLMNOPQRSTUVWXYZ
Supports Extended Latin Alphabet
(convert [áéíóúýäëïöüñ] to [uppercase v] :: operators) // ÁÉÍÓÚÝÄËÏÖÜÑ
Supports many other alphabets
(convert [αβγδεζηθικλμνξοπρστυφχψωабвгдеёжзийклмнопрстуфхцчшщъыьэюя] to [uppercase v] :: operators) // ...
Recommendations:
Use this:
[scratchblocks]
(convert [tExT] to [lowercase v] :: operators)
[/scratchblocks] instead of
[scratchblocks]
(convert (convert [tExT] to [lowercase v] :: operators) to [lowercase v] :: operators)
[/scratchblocks] for better performance.
IS () () ?
<is [a] [lowercase v] :: operators>
Features:
There are 3 options: lowercase, uppercase and none (none means neither lowercase nor uppercase).
<is [A] [lowercase v] :: operators> // false
Recommendations:
Use this if you want to verify each character of the text.
(call ({script variables ((result) :: grey)@addInput :: grey
set [result v] to (list@addInput :: list)
warp{
for each ((item) :: list) in (split (text) by ( v) :: operators){
add <is (item) (type) ? :: operators> to (result)
}@loopArrow :: list
} :: grey
report (result) :: control cap} input names: ((text) :: grey) ((type) :: grey)@delInput@addInput :: ring grey) with inputs: [Hello, World!] [lowercase]@delInput@addInput :: control)
Notes:
Only supports the first 1401 Unicode characters for better performance. Reply to me if you need anything.
★★★★★ Five stars! I like that this is JavaScript free. I've done this before as well, for a project.
Fun Fact:
Did you know:
Instead of using ScratchBlocks on the forums, you can use the feature "Script Pic..."? Just right-click a script and press "Script Pic..."!
<big>3 points here:</big>
___
* Why is there 2 topics?
* Why did you add
[quote="scratchmodification, post:1, topic:9602"]
*(C) 2021 ScratchModification.*
[/quote]
? You can't copyright stuff on Snap<i>!</i>.
* Nice project.
___
<big>`My Rating`</big>
___
★★★★★ Five stars! I like that this is JavaScript free. I've done this before as well, for a project.
___
<big>Fun Fact:</big>
___
Did you know:
Instead of using ScratchBlocks on the forums, you can use the feature "Script Pic..."? Just right-click a script and press "Script Pic..."!
Did you know:
There is another way to do this.
[details=Script]

[/details]
(For lowercase)
[details="Script"]

[/details]
(For uppercase)
(Warning: More than you probably wanted to know about this, coming up.)
Actually, anything you create, in any medium, is automatically copyright. Those copyright notices used to be required, but now they're just a convenient way to let people track down who owns a copyright.
If you want to let anyone do anything with your work, you can explicitly disclaim copyright with a notice along the lines of "I, joecooldoo, the author of this work, hereby disclaim copyright in it, placing it in the public domain."
You can have more or less restrictive licenses on things you write. Many works under copyright have very restrictive licenses, so you have to pay money just to see the work, and even then you aren't allowed to make a copy of it. (Hence the name "copyright.")
People who want to let people use their stuff often use a Creative Commons license, especially if the stuff isn't a computer program, for which other more specific licenses are more commonly used. There are several CC licenses; I think there are five possible Boolean conditions, but not all 25 combinations are possible.
The thing about Snap! is that it doesn't make sense to publish a project on our web site unless you want people to use it. If you don't publish it, of course you can keep it to yourself. The only thing that's non-obvious about publishing on the Snap! site is that, because we believe in remixing, we require the use of the CC-BY-NC-SA (or, if you prefer, CC-BY-SA) license.
I vote for "better." Using higher order functions makes code so much more readable! But you're focusing on a different question, which is how to parameterize a script. And the best answer to that is to make it a procedure (a custom block (yes, I know you know that, but other people may read this)) with inputs, rather than build the example into the script, whether via CALL or some other way.
Looking further at the code, I couldn't find any optimization issues that I would know how to fix, but I like how you directly use booleans in math functions (as in ). I didn't think anyone else did that.