-
num: A data type that stores all the integer and float point values
-
String: A data type used to store text-based data, such as names, addresses, messages, and more. (basically int)
-
boolean: There are two values of the Boolean data type: Cap and NoCap, which represent "false" and "true" statements, respectively.
- + : This represents addition operation (2+5=7)
- - : This represents subtraction operation (2-5=-3)
- * : This represents multiplication operation (2*5 = 10)
- / : This represents division operation (2/5 = 0.4)
- := (this represents the equal to operation (num i := 5))
- watchaPackin: (returns the number of character in the string, i.e its length)
- [m:*] (returns the substring from index m to end)
- [m:n] (returns the substring from index m to index n - 1)
- [m] (returns the character at index m)
- (returns the index of string2 in string1)
string name := "pritam"
string substr
substr := name[0:3]
goOffKing substr
num len
len := watchaPackin: substr
goOff "Length is: "
goOff len
Output: pri Length is: 3
- goOff (prints the string/ number / boolean to the console)
- goOffKing (prints the string/ number / boolean to the console along with a new line)
- getSauce (takes input from the user; there are three type specifiers: %n, %b, and %s for numbers, booleans, and strings respectively)
Input: hey
goOff "Hello World!"
string name
getSauce %s name
goOff name
Output: Hello World! : Pritam Pritam
Iterative Statements
- loopin i : (initial,final) (for loop - intitial to final)
A loop which executes the code, written in the block, (final-initial) times
Example:
num m := 0
num n := 3
loopin i : (m,n)
{
goOff i
}
- tillClapback() (while) A loop which executes the code, written in the block, till the [condition] becomes Cap.
Example :
num i := 5
tillClapback(i > 0)
{
goOff i
i := i - 1
}
-
vibeCheck() (If): executes the code if the [condition] is NoCap.
-
bruhPlease() (else if ): the "else-if" equivalent
-
okBoomer (else): the "else" equivalent
-
peaceOut: End if statement Ends the if loop.
Example:
num i := 5
vibeCheck i == 1
{
goOff i
}
bruhPlease i == 3
{
goOff i
}
okBoomer
{
goOff i
}
peaceOut