SandCastleIcon.png This article has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites.

Wikipedia-logo.svg  For more information, see Computer programming on Wikipedia.

"Scripting" redirects here. For a detailed explanation of a script and its purposes, see Script. For other uses, see Program (disambiguation).

Programming is the act of writing computer programs. It is necessary to make an interactive Scratch project. It involves implementing algorithms, which describe processes that a computer can follow. Scratch is an imperative programming language which uses blocks instead of text. This makes Scratch simpler to learn and easy to use, while still developing the logical reasoning that can be applied to other languages.

Programming in Scratch

The process of scripting in Scratch.

In Scratch, programming is often referred to as "scripting" because a script is a stack or combination of blocks. The blocks are the code of the project, meaning they tell it what to do. The blocks are represented in JSON, which is interpreted in the ActionScript language. Formally, a script is a program that is interpreted rather than compiled.[1]

Scripting is done in the Code Area, or the large open space of the Scratch editor between the block palette and the stage when the "Code" tab is open. In order to program, blocks are dragged from the block palette and into the code area. From there, they can be spread out or snapped together as desired.

Text-Based Programming

Programming in Greenfoot, a Java IDE

Scratch and other graphical programming languages are very unique because in other programming languages the code consists entirely of text. This means that one must take care that their code conforms to the grammar (rules of syntax) for the programming language; for example, a misplaced punctuation mark may result in a syntax error. Such a thing cannot happen in Scratch, and will never happen[2]. Some text-based languages include:

Is Advanced Programming Needed?

Scratch, though it is a programming language, does not require the use of advanced programming to make all types of projects. Some projects, such as an art project, may have no scripts at all but be a still image of an artwork created by the user. Scratch is designed to help people program easily as well as convey creativity, in which complicated programming is not always needed. However, learning programming beyond the basic programming necessary to create a project can be useful, both in Scratch and elsewhere.

See Also