RosettaCodeData/Lang/PepsiScript/00-LANG.txt
2023-07-01 13:44:08 -04:00

35 lines
No EOL
2.5 KiB
Text

{{stub}}
{{language
|checking=static
|hopl=no
|site=
}}
{{language programming paradigm|object-oriented}}
PepsiScript is a programming language and the name of [https://scratch.mit.edu/projects/97635357/ its official editor] (which is in the form of a command-line interface) and [https://scratch.mit.edu/projects/97721007/ its "virtual machine"] that runs on top of [[Scratch]], both originally released on February 12th, 2016 by [[Scratch]] user [https://scratch.mit.edu/users/TheHeroTeam TheHeroTeam].
PepsiScript features the following commands:
{| class="wikitable"
!Command
!Description
|-
| style="text-align:center"| <code>function</code> || Acts as a function. Function names can be a minimum of two characters long, and all code must be in functions to be entered. However, multiple functions can be created. However, functions do not need to be declared in order to work, and cannot be declared.
|-
| style="text-align:center"| <code>print</code> || Prints text to the screen. A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, (uppercase only (however, the lowercase versions are also accepted, but will still output in uppercase)) !, ., <space> and ? are supported.
|-
| style="text-align:center"| <code>clearText</code> || Clears all text on the screen.
|-
| style="text-align:center"| <code>addCat</code> || Adds a picture of the [https://en.scratch-wiki.info/wiki/Scratch_Cat Scratch Cat] to the screen. Only one picture of the Scratch cat can be on the screen at once.
|-
| style="text-align:center"| <code>moveCat</code> || Moves the picture of the [https://en.scratch-wiki.info/wiki/Scratch_Cat Scratch Cat] a small amount to the right.
|-
| style="text-align:center"| <code>showCursorCircle</code> || Does nothing, not even toggle whether the circle around the cursor is showing or not.
|-
| style="text-align:center"| <code>//<message></code> || Acts as a comment. Unlike ''function'' and ''print'', the command does not have to be chosen before the value, and does not have to be within a function.
|-
| style="text-align:center"| <code>compile</code> || "Compiles" the code so it can be run (only the "virtual machine" can run programs). Unlike every other command, this command cannot be used in programs.
|}
For each example, a version to type and a "compiled" version to run is provided so the code can be entered into the editor in any possible way without having to convert between one or the other.
[[Category:Language Implementations in Scratch]]
[[Category:Web Application]]