ScratchData LogoScratchData
Back to TruBlu's profile

Blu Programming Language (WIP)

TRTruBlu•Created October 24, 2019
Blu Programming Language (WIP)
10
9
77 views
View on Scratch

Instructions

**WORK IN PROGRESS** GO TO "SEE INSIDE" and type code in the "code list" A functioning programming language that is able to: - create, store, and call on variables - print statements - get user input Currently working on: - math functions - if statements - ability to join strings

Description

SYNTAX - Always enclose strings in ("") - Always enclose numbers in () - Spacing does not affect program - Always end program with #end VARIABLES - Declare variable syntax: var VARNAME = (VARVALUE) >> use the same format to give variable new value >> VARVALUE must be enclosed in parenthesis - Calling variables within function: @VARNAME >> call a variable with a "@" symbol followed by the variable name >> ex: print(@VARNAME) - Variable name MUST start with letter, then numbers can be used: >> ex: var VARNAME1 ACCEPTABLE >> ex: var 1VARNAME NOT ACCEPTABLE GETTING USER INPUT - Get string/number input: getInput(MESSAGE) >> displays MESSAGE to user and gives prompt - Storing user input: var VARNAME = (@ANS) >> @ANS holds the last string inputted by the user >> ex: getInput("Enter your name:") var name = (@ANS) >> this stores the user input in the variable "name" PRINTING - Output string: print(MESSAGE) >> displays MESSAGE to output >> ex: print("Hello World!") output: Hello World! DELAY - Delay program: delay(X) >> This pauses the program for X amount of seconds >> ex: delay(5)

Project Details

Project ID339197204
CreatedOctober 24, 2019
Last ModifiedJanuary 29, 2023
SharedOctober 27, 2019
Visibilityvisible
CommentsAllowed