ShoutLang Banner

SHOUTLANG PLAYGROUND

CODE

OUTPUT


                    
View on GitHub

ShoutLang Guide

Set Variables

  • SET VAR = VALUE — Assign a value to a variable
SET A = 5
SET NAME = "John"
SET FL  = 1.5

Math Operations

  • ADD/SUB/MUL/DIV VAR VALUE — Perform arithmetic operations on variables
  • SET VAR = ADD X Y — Assign result of arithmetic to a variable
  • Variables and integers can be mixed in operations
SET A = 10
SET B = 5
ADD A 3         ! A becomes 13
SUB B 2         ! B becomes 3
MUL A B         ! A becomes 39 (13*3)
DIV B 2         ! B becomes 1.5
SET C = ADD A 7 ! C is 46 (39+7)
SET D = MUL A B ! D is 58.5 (39*1.5)
SET E = SUB D 10! E is 48.5
SET F = DIV E 2 ! F is 24.25

Printing & Output

  • SHOUT(...) — Print values or results
SHOUT("Hello", A)
SHOUT(A)

Comparisons

  • SHOUT(A < B) — Prints YESSS or NOOO for comparisons
SHOUT(A < B)
SHOUT(A >= B)
SHOUT(A == B)
SHOUT(A != B)
SHOUT(A >= B)
SHOUT(A <= B)

Type & Input

  • AMPLIFY(VAR) — Prints the type of a variable
  • WHATT VAR — Prompts user for input
AMPLIFY(A)
SET NAME = WHATT("WHAT IS YOUR NAME?")

Modes

  • MODE ANGRY: Only uppercase code is accepted. Any lowercase line is ignored.
  • MODE CALM: Only lowercase code is accepted. Any uppercase line is ignored.
  • MODE CHAOS: All math operations (ADD, SUB, etc.) have double effect.
  • MODE NORMAL: Regular behavior, all code is accepted and operations are normal.
MODE ANGRY
SET A = 5
add a 2  ! ignored in ANGRY mode
ADD A 2  ! works in ANGRY mode

MODE CALM
set b = 10  ! works in CALM mode
SET B 2     ! ignored in CALM mode

MODE CHAOS
SET X = 1
ADD X 2     ! X becomes 5 (2*2 + 1)

MODE NORMAL
SET Y = 3
ADD Y 2     ! Y becomes 5

Tip: You can switch modes at any point in your code. For example, use MODE CHAOS to double all math results, or MODE CALM to require lowercase commands.

Comments

  • Comments start with !
! This is a comment
! SET A = 5 (this line is ignored)