https://github.com/sunny-dee-71/simp-script
https://github.com/sunny-dee-71/simp-script
language programming simpscript ss
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sunny-dee-71/simp-script
- Owner: sunny-dee-71
- Created: 2025-02-04T16:12:58.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-03-06T14:29:23.000Z (10 months ago)
- Last Synced: 2025-03-06T15:32:34.775Z (10 months ago)
- Topics: language, programming, simpscript, ss
- Language: C#
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **SimpScript Features**
### **📝 Basic Commands**
- **`say [expression]`** → Prints a message to the console.
- Example: `say "Hello, World!"`
- **`set [variable] = [value]`** → Assigns a value to a variable.
- Example: `set name = "Sunny"`
- **`set [variable] = input "[prompt]"`** → Prompts user input and stores it in a variable.
- Example: `set name = input "Enter your name"`
---
### **🔢 Expressions & Operations**
- Supports **string concatenation** with `+`.
- Example: `say "Hello, " + name`
- Supports **math operations** (`+`, `-`, `*`, `/`).
- Example: `set x = 5 + 3`
- Supports **variable replacement** in expressions.
- Example: `say x + 2` (if `x = 5`, prints `7`).
---
### **🔁 Loops**
- **Fixed Loop:** `repeat [number] times` → Loops a set number of times.
- Example:
```plaintext
repeat 3 times
say "Looping!"
end
```
- **Conditional Loop:** `repeat while [condition]` → Loops while a condition is true.
- Example:
```plaintext
set x = 0
repeat while x < 5
say "x is " + x
set x = x + 1
end
```
- **Range Loop:** `repeat [var] from [start] to [end]` → Loops through a range.
- Example:
```plaintext
repeat i from 1 to 5
say "Number " + i
end
```
---
### **❓ Conditional Statements**
- **If Statements:** `if [condition]` → Executes code only if the condition is met.
- Example:
```plaintext
set x = 5
if x > 3
say "x is greater than 3"
end
```
- **Supported Conditions:**
- `==` (equals)
- `!=` (not equals)
- `>` (greater than)
- `<` (less than)
- `>=` (greater than or equal to)
- `<=` (less than or equal to)
---
### **🎯 Examples**
#### **Full Program**
```plaintext
say "What is your name?"
set name = input "Enter your name"
say "Hello, " + name
set x = 5
say x + " is set to " + x
if x > 3
say x + " is greater than 3"
end
repeat 3 times
say "Looping!"
end
repeat i from 1 to 3
say "Counting: " + i
end
```