Discuss Scratch

TheCreatorOfUnTV
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

What coding language is this:
when green flag clicked
say [Hi!]
repeat until <(answer) = [1]>
ask [What number am I thinking?] and wait
end
say [Correct!]
most similar to?
For comparison purposes, look at the script below (same data, but different display format):
when green flag clicked
say [Hi!]
repeat until <(answer) = [1]>
ask [What number am I thinking?] and wait
end
say [Correct!]
breakfast_for_dinner
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

maybe ruby?
CST1229
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

breakfast_for_dinner wrote:

(#2)
maybe ruby?

I'd say Lua, mainly because of the if…then syntax.
local var = true
if var then
    print "hello world!" -- i'm pretty sure this is valid lua syntax
end
function functionDef()
    -- idk
end

Or maybe tosh, but that might not count.

Last edited by CST1229 (July 23, 2024 03:28:44)

mybearworld
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

CST1229 wrote:

(#3)
Or maybe tosh, but that might not count.
It's probably Tosh, it looks very similar to scratchblocks.
when green flag clicked
say "Hi!"
repeat until answer = 1
ask "What number am I thinking?" and wait
end
say "Correct!"
CST1229
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

mybearworld wrote:

(#4)

CST1229 wrote:

(#3)
Or maybe tosh, but that might not count.
It's probably Tosh, it looks very similar to scratchblocks.
when green flag clicked
say "Hi!"
repeat until answer = 1
ask "What number am I thinking?" and wait
end
say "Correct!"
I was saying “but it might not count” since I assume OP was asking for “mainstream” programming languages, not one designed specifically to look and be like Scratch.

Last edited by CST1229 (July 23, 2024 12:00:21)

ajskateboarder
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

HyperTalk comes pretty close
TheCreatorOfUnTV
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

ajskateboarder wrote:

HyperTalk comes pretty close
What does it look like?
meunspeakable
Scratcher
100+ posts

What coding language is the code for Scratchblocks most similar to?

TheCreatorOfUnTV wrote:

ajskateboarder wrote:

HyperTalk comes pretty close
What does it look like?
on mouseDown
put the name of me into oldName
repeat while the mouse is down
if the mouseLoc is within the rect of card button “boundary” then
set the location of me to the mouseLoc
set the name of me to “(” & the mouseLoc & “)”
end if
end repeat
set the name of me to oldName
end mouseDown
breakfast_for_dinner
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

meunspeakable wrote:

TheCreatorOfUnTV wrote:

ajskateboarder wrote:

HyperTalk comes pretty close
What does it look like?
on mouseDown
put the name of me into oldName
repeat while the mouse is down
if the mouseLoc is within the rect of card button “boundary” then
set the location of me to the mouseLoc
set the name of me to “(” & the mouseLoc & “)”
end if
end repeat
set the name of me to oldName
end mouseDown
and people are saying python looks like pseudo code

somehow i think it's too simple to resemble scratchblocks

Last edited by breakfast_for_dinner (July 23, 2024 21:39:09)

TheCreatorOfUnTV
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

meunspeakable wrote:

TheCreatorOfUnTV wrote:

ajskateboarder wrote:

HyperTalk comes pretty close
What does it look like?
on mouseDown
put the name of me into oldName
repeat while the mouse is down
if the mouseLoc is within the rect of card button “boundary” then
set the location of me to the mouseLoc
set the name of me to “(” & the mouseLoc & “)”
end if
end repeat
set the name of me to oldName
end mouseDown
Yeah…that doesn't look like Scratchblocks code.

Last edited by TheCreatorOfUnTV (July 24, 2024 03:30:40)

horizontal_shading
Scratcher
1000+ posts

What coding language is the code for Scratchblocks most similar to?

It is close to Javascript, because the Scratch website is coded in that language.

Powered by DjangoBB