-
Notifications
You must be signed in to change notification settings - Fork 0
If statements
Like any other programming language, if statements are a key building block to any program. With the if statements you can check a value against another value with an operator. In the Chill&chat CLI, you can create an if statement with argument 1 against argument 3 with argument 2 as an operator and argument 4 as a function body.
There are many operators that the if command support. Here is a list of them below:
isEqualTo
- Checks if argument 1 is equal to argument 2 similar to ==
.
notEqualtop
- Checks if argument 1 is not equal to argument 2 similar to !=
.
greaterThan
- Checks if argument 1 is greater than argument 2 similar to >
.
smallerThan
- Checks if argument 1 is smaller than argument 2 similar to <
.
greaterOrEqualTo
- Checks if argument 1 is greater or equal to argument 2 similar to >=
.
smallerOrEqualTo
- Checks if argument 1 is smaller or equal to argument 2 similar to <=
.
isDivisibleBy
- Checks if argument 1 is divisible by argument 2 similar to % == 0
.
isNotDivisible
- Checks if argument 1 is not divisible by argument 2 similar to % != 0
.
if "<VALUE>" isEqualTo "<VALUE>" (
# Code here...
)
- Home
- Setup
- Print command
- Variables and set command
- Append command
- Array command
- Call command
- Clear command
- Compare command
- Concat command
- Create command
- Delay command
- Delete command
- Disable command
- Enable command
- Exit command
- Export command
- Fetch command
- Functions and the function command
- Get command
- If statements
- Import command
- Length command
- Load string command
- Object command
- POST command
- Prompt command
- Read command
- Remove command
- Repeat command
- Shell command
- Write command
- Calculate command
- Sin cos and tan commands
- PI command
- Rand command
- Round command
- Sqrt command
- Delete message command
- Get messages command
- Follow user command
- Get public rooms command
- Get rooms command
- Join room command
- Login command
- On message command
- Remove room command
- Room exists command
- Send message command
- Signout command
- Final words&thoughts