Hello World — Your First Program
Traditionally, the first program in any language prints "Hello, World!" to the screen. Let's do that!
Create Your First File
- Open your text editor (VS Code, Notepad, etc.)
- Create a new file named
hello.adesh - Type this code:
print("Hello, World!");
Output:
Hello, World!
Run It
Open a terminal in the folder where you saved the file:
adesh run hello.adesh
Output:
Hello, World!
🎉 You just ran your first AdeshLang program!
What Just Happened?
| Code | Meaning |
|---|---|
print(...) | A function that displays text |
"Hello, World!" | A string — text wrapped in quotes |
; | Ends a statement (like a period in English) |
Try It Yourself
Change the message and run again:
print("Hello, AdeshLang!");
print("I'm learning to code!");
print("This is fun!");
Output:
Hello, AdeshLang!
I'm learning to code!
This is fun!
Understanding the Parts
The print Function
Think of print as a machine: you give it something, it shows it on screen.
print("Hello"); // Input: "Hello" → Output: Hello
print(42); // Input: 42 → Output: 42
print(true); // Input: true → Output: true
print(3.14); // Input: 3.14 → Output: 3.14
Output:
Hello
42
true
3.14