ScratchData LogoScratchData
Back to magillt's profile

Simple code interpreter

MAmagillt•Created February 11, 2022
Simple code interpreter
2
2
17 views
View on Scratch

Instructions

+ adds one to the value under the pointer - subtracts one from the value under the pointer > moves the pointer one forward < moves the pointer one backward [ and ] work as a while loop; while the value under the pointer is more than zero, the script in the brackets will run. . prints the value under the pointer , asks for an input \ treats new outputs as alpha; 1-26: a-z, 27-52: A-Z, 53-57: .,!?[space], 58-67: 0-9 / (default) treats new outputs as numbers

Description

Examples: count up: ,[>+.<-] count down: ,[.-] adder: ,>,[<+>-]<. subtractor: ,>,[<->-]<. multiplier: ,>,<[>[>+<-]>[>+<<+>-]<<-]>>>. divisibility test: ,>,<[>[>>+<<-]>>[<+<+>>-]<[<<->>-]<<]+[>>>+<<<-]>>>. divider (ceiling): ,>,<[>[>>+<<-]>>[<+<+>>-]<[<<->>-]>>+<<<<]>>>>. Fibonacci: +.>+.>>,[<<[>+<-]<[>+<-]>>[<+<+>>-]<.>>-] Hello, World!: \>+++++++++++[<++++>-]<[>+>+>+>+<<<<-]>----------.<+++++.+++++++..+++.>>++++++++++. +++.>+++++.<<<.+++.------.--------.>>>>+++++++++++.

Project Details

Project ID642898458
CreatedFebruary 11, 2022
Last ModifiedMarch 3, 2022
SharedFebruary 11, 2022
Visibilityvisible
CommentsAllowed