Welcome!
Learn to program from scratch with Neuridion
Welcome to Neuridion! You are about to learn one of the most valuable skills of the modern world: programming. This guide assumes you have never written a single line of code before, and that is perfectly fine. Everyone starts somewhere.
Programming is the art of giving instructions to a computer. You write those instructions in a programming language — a special vocabulary and set of rules that both you and the computer can understand. The computer then follows your instructions, step by step, exactly as you wrote them.
Neuridion is designed to be readable and approachable. Its syntax reads almost like English, so you can focus on what you want to do rather than wrestling with cryptic symbols. By the end of this guide, you will be able to create variables, make decisions, repeat actions, write your own functions, work with collections of data, and build a complete interactive program.
Your First Program
Every programmer's journey begins with a tiny program that displays a message on screen. This tradition is called "Hello, World!" and it has been the very first program for millions of programmers over the past fifty years. Let's continue that tradition.
Open Neuridion IDE, create a new project (or use the Main.code file that comes with every new project), and type the following:
Print("Hello, World!")
Now press Cmd+R (or click the Run button in the toolbar). Look at the console panel at the bottom of the window. You should see:
Hello, World!
Congratulations — you just wrote and ran your first program!
Let's break down what happened:
Printis a built-in command that displays text in the console.- The parentheses
( )surround the value you want to display. - The quotation marks
" "tell Neuridion that this is a string — a piece of text. Everything between the quotes is treated as literal text.
You can use multiple Print statements to display several lines:
Print("Hello, World!")
Print("My name is Neuridion.")
Print("I am ready to learn!")
Each Print statement outputs its text on a new line. Run this and you will see all three messages appear, one after the other.
You can also display blank lines to create visual spacing:
Print("Line one")
Print("")
Print("Line three (with a blank line above)")
Variables
Imagine you have a set of labeled boxes. You can put something into a box, look at what is inside, and swap its contents for something new. In programming, these labeled boxes are called variables.
A variable has three parts: a name (the label on the box), a type (what kind of thing fits inside), and a value (what is currently inside). In Neuridion, you create a variable with the Var keyword:
Var name As String = "Alice"
Var age As Integer = 25
Var height As Double = 1.75
Var isStudent As Boolean = True
Neuridion has four basic types of data:
| Type | What it holds | Example values |
|---|---|---|
String | Text (letters, words, sentences) | "Hello", "42", "" |
Integer | Whole numbers (no decimals) | 0, 7, -100 |
Double | Decimal numbers | 3.14, -0.5, 99.0 |
Boolean | True or False | True, False |
Let's see variables in action:
Var city As String = "Berlin"
Print("I live in " + city)
Var year As Integer = 2026
Print("The year is " + year.ToString())
Notice the + operator joins text together. When you want to include a number inside a text message, use .ToString() to convert it to a string first.
Changing a Variable's Value
Once a variable exists, you can change its value at any time — just leave out the Var keyword:
Var score As Integer = 0
Print("Score: " + score.ToString())
score = 10
Print("Score: " + score.ToString())
score = score + 5
Print("Score: " + score.ToString())
This program outputs:
Score: 0
Score: 10
Score: 15
The line score = score + 5 means: "take the current value of score, add 5 to it, and store the result back in score." This is a very common pattern in programming.
+= or -=. Always write the full expression: score = score + 5, not score += 5.Naming Rules
Variable names can contain letters, numbers, and underscores. They must start with a letter or underscore. Choose descriptive names that make your code easy to read:
// Good names
Var userName As String = "Bob"
Var totalPrice As Double = 19.99
Var itemCount As Integer = 3
// Avoid vague names like x, a, temp
Input & Output
So far, all the data in our programs has been hard-coded — written directly into the source code. But real programs need to interact with users. Neuridion gives you two simple tools for this:
Print()— sends text out to the console (you already know this one!)Console.ReadLine()— waits for the user to type something in and returns it as a string
Here is a program that asks for your name and greets you:
Print("What is your name?")
Var name As String = Console.ReadLine()
Print("Hello, " + name + "!")
When you run this program, it will print "What is your name?" and then pause, waiting for you to type something in the console input field at the bottom of the IDE. Type your name, press Enter, and the program continues with the greeting.
Console.ReadLine() always returns a String. If you need a number, you must convert it. Use .ToInteger() for whole numbers or .ToDouble() for decimal numbers.Here is a small calculator that adds two numbers:
Print("Enter the first number:")
Var input1 As String = Console.ReadLine()
Var num1 As Integer = input1.ToInteger()
Print("Enter the second number:")
Var input2 As String = Console.ReadLine()
Var num2 As Integer = input2.ToInteger()
Var sum As Integer = num1 + num2
Print("The sum is: " + sum.ToString())
Try running this and entering different numbers. The program reads text from the user, converts it to integers, adds them together, and displays the result.
Making Decisions
Programs become truly useful when they can make decisions. Think about it: a thermostat turns on the heater if the temperature is too low. A login page lets you in if your password is correct. This "if this, then that" logic is one of the most fundamental concepts in programming.
In Neuridion, you use If, Then, Else, and End If:
Var age As Integer = 18
If age >= 18 Then
Print("You can vote!")
Else
Print("Too young to vote.")
End If
Here is how it works:
- Neuridion evaluates the condition after
If(in this case,age >= 18). - If the condition is True, the code between
ThenandElseruns. - If the condition is False, the code between
ElseandEnd Ifruns.
Change age to 15 and run it again — you will see the other message.
Multiple Conditions with ElseIf
Sometimes you need to check more than two possibilities. Use ElseIf to add extra conditions:
Print("Enter your score (0-100):")
Var input As String = Console.ReadLine()
Var score As Integer = input.ToInteger()
If score >= 90 Then
Print("Grade: A - Excellent!")
ElseIf score >= 80 Then
Print("Grade: B - Good job!")
ElseIf score >= 70 Then
Print("Grade: C - Not bad.")
ElseIf score >= 60 Then
Print("Grade: D - Needs improvement.")
Else
Print("Grade: F - Try again.")
End If
Neuridion checks each condition from top to bottom and runs the first block where the condition is True. If none are True, the Else block runs.
Comparison Operators
You can compare values using these operators:
| Operator | Meaning | Example |
|---|---|---|
= | Equal to | age = 18 |
<> | Not equal to | name <> "Admin" |
< | Less than | score < 50 |
> | Greater than | score > 100 |
<= | Less than or equal | age <= 12 |
>= | Greater than or equal | age >= 18 |
Combining Conditions
Use And, Or, and Not to combine multiple conditions:
Var age As Integer = 25
Var hasLicense As Boolean = True
If age >= 18 And hasLicense Then
Print("You can drive!")
End If
Var isWeekend As Boolean = True
Var isHoliday As Boolean = False
If isWeekend Or isHoliday Then
Print("No work today!")
End If
Var isRaining As Boolean = False
If Not isRaining Then
Print("Let's go for a walk!")
End If
And— both conditions must be TrueOr— at least one condition must be TrueNot— flips True to False and vice versa
Loops
Imagine you need to print the numbers 1 through 100. Writing one hundred Print statements would be tedious and error-prone. Loops let you repeat a block of code automatically.
The For Loop
A For loop repeats code a specific number of times:
For i = 1 To 5
Print("Count: " + i.ToString())
End For
Output:
Count: 1
Count: 2
Count: 3
Count: 4
Count: 5
Here is what happens step by step:
istarts at1.- The code inside the loop runs (printing the current value of
i). iincreases by 1 automatically.- Steps 2-3 repeat until
iexceeds5.
You can also count with a custom step using Step:
// Count by twos
For i = 0 To 10 Step 2
Print(i.ToString())
End For
This prints: 0, 2, 4, 6, 8, 10.
The While Loop
A While loop repeats as long as a condition remains True. Use it when you do not know in advance how many times you need to loop:
Var count As Integer = 1
While count <= 5
Print("Count: " + count.ToString())
count = count + 1
End While
This produces the same output as the For loop above. The key difference: you must update the variable yourself (count = count + 1), otherwise the loop would run forever!
While loop never becomes False, the program will run forever (an "infinite loop"). Always make sure something inside the loop changes the condition. You can press the Stop button in the toolbar to halt a runaway program.A Multiplication Table
Here is a practical example that combines loops with what you have learned so far — a multiplication table:
Print("=== Multiplication Table (1-5) ===")
Print("")
For row = 1 To 5
Var line As String = ""
For col = 1 To 5
Var product As Integer = row * col
line = line + product.ToString() + "\t"
End For
Print(line)
End For
This uses a loop inside a loop (called a "nested loop"). The outer loop handles each row, and the inner loop calculates each column value. The "\t" inserts a tab character for neat spacing.
Functions
As your programs grow, you will find yourself writing the same code in multiple places. Functions let you package a block of code under a name so you can reuse it whenever you need it. Think of a function as a recipe: you define it once, then "call" it any time you want to use it.
Sub: Functions Without a Return Value
A Sub performs an action but does not give back a value:
Sub Greet(name As String)
Print("Hello, " + name + "!")
Print("Welcome to Neuridion.")
End Sub
// Call the Sub
Greet("Alice")
Greet("Bob")
Output:
Hello, Alice!
Welcome to Neuridion.
Hello, Bob!
Welcome to Neuridion.
The name inside the parentheses is a parameter — a placeholder that gets filled in each time you call the Sub. When you call Greet("Alice"), the parameter name takes on the value "Alice".
Function: Functions That Return a Value
A Function calculates something and gives the result back using Return:
Function Add(a As Integer, b As Integer) As Integer
Return a + b
End Function
Var result As Integer = Add(3, 4)
Print("3 + 4 = " + result.ToString())
Output:
3 + 4 = 7
Notice the As Integer after the parentheses — this declares the return type, telling Neuridion what kind of value the function will give back.
Here is a more practical example — a function that checks whether a number is even or odd:
Function IsEven(number As Integer) As Boolean
Return number Mod 2 = 0
End Function
For i = 1 To 10
If IsEven(i) Then
Print(i.ToString() + " is even")
Else
Print(i.ToString() + " is odd")
End If
End For
The Mod operator gives the remainder after division. If a number divided by 2 has a remainder of 0, it is even.
Arrays
A variable holds a single value. But what if you need to store a list of values — like a shopping list, a deck of cards, or a set of test scores? That is where arrays come in.
An array is an ordered collection of values. You create one with square brackets:
Var fruits As Array = ["Apple", "Banana", "Cherry"]
Each item in an array has a position number called an index. Indices start at 0 (not 1). So in the array above:
| Index | Value |
|---|---|
| 0 | "Apple" |
| 1 | "Banana" |
| 2 | "Cherry" |
Access an item by its index using square brackets:
Var fruits As Array = ["Apple", "Banana", "Cherry"]
Print(fruits[0]) // Apple
Print(fruits[1]) // Banana
Print(fruits[2]) // Cherry
Adding Items
Use .Append() to add an item to the end of an array:
fruits.Append("Date")
Print("Now I have " + fruits.Count.ToString() + " fruits")
The .Count property tells you how many items are in the array.
Looping Through an Array
A For loop is perfect for going through every item in an array:
Var fruits As Array = ["Apple", "Banana", "Cherry", "Date"]
For i = 0 To fruits.Count - 1
Print("Fruit #" + i.ToString() + ": " + fruits[i])
End For
Output:
Fruit #0: Apple
Fruit #1: Banana
Fruit #2: Cherry
Fruit #3: Date
We use fruits.Count - 1 as the upper bound because indices start at 0. If there are 4 items, the last index is 3.
You can also use For Each for a cleaner way to loop through every item:
Var colors As Array = ["Red", "Green", "Blue"]
For Each color In colors
Print("Color: " + color)
End For
Arrays of Numbers
Arrays can hold any type of value:
Var scores As Array = [85, 92, 78, 96, 88]
// Calculate the total
Var total As Integer = 0
For Each s In scores
total = total + s
End For
Print("Total: " + total.ToString())
Print("Average: " + (total / scores.Count).ToString())
.Count for the number of items in an array. Use .Length for the number of characters in a string. Do not mix them up!Objects
An array stores values in a numbered list. But sometimes you want to store values with meaningful names instead of numbers. For example, a person has a name, an age, and a city — you would rather look up person["name"] than person[0].
In Neuridion, you use Objects for this. An Object stores key-value pairs, where each key is a string name and each value can be anything:
Var person As Object = {"name": "Alice", "age": 25, "city": "Berlin"}
Access values using square brackets with the key name:
Print(person["name"]) // Alice
Print(person["age"]) // 25
Print(person["city"]) // Berlin
Adding and Changing Values
You can add new keys or change existing ones at any time:
person["email"] = "alice@example.com" // Add a new key
person["age"] = 26 // Change an existing value
Print(person["email"]) // alice@example.com
Print(person["age"]) // 26
Checking if a Key Exists
Use .ContainsKey() to check if a key exists before accessing it:
If person.ContainsKey("email") Then
Print("Email: " + person["email"])
Else
Print("No email on file.")
End If
Counting Entries
Use .Count to see how many key-value pairs an Object holds:
Print("Fields: " + person.Count.ToString())
As Object when declaring key-value pairs. Neuridion does not have a Dictionary type — Object is the correct type name.Here is a complete example that builds a small contact book:
Var contact1 As Object = {"name": "Alice", "phone": "555-0101"}
Var contact2 As Object = {"name": "Bob", "phone": "555-0202"}
Var contact3 As Object = {"name": "Carol", "phone": "555-0303"}
Var contacts As Array = [contact1, contact2, contact3]
Print("=== Contact Book ===")
For Each c In contacts
Print(c["name"] + ": " + c["phone"])
End For
This shows a powerful pattern: an array of Objects. Each Object represents one contact, and the array holds all contacts together.
Your First Real Program
You now know enough to build something real. Let's create a number guessing game that combines variables, input/output, decisions, and loops. The computer will pick a random number, and you have to guess it!
Print("=== Number Guessing Game ===")
Print("I'm thinking of a number between 1 and 100.")
Print("Can you guess it?")
Print("")
Var secret As Integer = Math.RandomInt(1, 100)
Var guesses As Integer = 0
Var found As Boolean = False
While Not found
Print("Your guess:")
Var input As String = Console.ReadLine()
Var guess As Integer = input.ToInteger()
guesses = guesses + 1
If guess = secret Then
Print("Correct! You got it in " + guesses.ToString() + " guesses!")
found = True
ElseIf guess < secret Then
Print("Too low! Try higher.")
Else
Print("Too high! Try lower.")
End If
End While
Let's walk through how this program works:
- It prints a welcome message.
Math.RandomInt(1, 100)picks a random integer between 1 and 100 and stores it insecret.- A
Whileloop runs as long asfoundisFalse. - Inside the loop, the program asks for a guess, reads the input, and converts it to an integer.
- It increments the
guessescounter by 1. - Then it compares the guess to the secret:
- If they are equal: print a congratulations message and set
found = Trueto exit the loop. - If the guess is too low: give a hint to go higher.
- If the guess is too high: give a hint to go lower.
- If they are equal: print a congratulations message and set
Run this program and play the game! A good strategy is to always guess the midpoint of the remaining range. With this approach, you can find any number in at most 7 guesses.
Using Modules
Neuridion comes with a rich standard library — a collection of pre-built modules that give your programs powerful capabilities without you having to build everything from scratch. There are modules for math, file handling, dates and times, networking, databases, graphics, audio, and much more.
You use a module by writing its name, a dot, and the method you want to call. No setup or import statements needed — all modules are available immediately.
Math
The Math module provides mathematical functions and random number generation:
// Square root
Var r As Double = Math.Sqrt(144)
Print("Square root of 144: " + r.ToString()) // 12.0
// Random number (simulating a dice roll)
Var dice As Integer = Math.RandomInt(1, 6)
Print("You rolled: " + dice.ToString())
// Other useful functions
Print(Math.Abs(-42).ToString()) // 42 (absolute value)
Print(Math.Max(10, 20).ToString()) // 20 (larger of two)
Print(Math.Min(10, 20).ToString()) // 10 (smaller of two)
Print(Math.Round(3.7).ToString()) // 4.0 (round to nearest)
FileAndFolder
The FileAndFolder module lets you read and write files on your computer:
// Write text to a file
Var path As String = FileAndFolder.TempDirectory + "/hello.txt"
FileAndFolder.WriteFile(path, "Hello from Neuridion!")
Print("File written to: " + path)
// Read the file back
Var content As String = FileAndFolder.ReadFile(path)
Print("File says: " + content)
// Check if a file exists
If FileAndFolder.FileExists(path) Then
Print("The file exists!")
End If
FileAndFolder.TempDirectory is a property (no parentheses!) that gives you a safe temporary folder for experimenting with files.DateAndTime
The DateAndTime module works with dates and times:
// Get the current date and time
Var now As Object = DateAndTime.Now()
Print("Current date: " + now.Format("yyyy-MM-dd"))
Print("Current time: " + now.Format("HH:mm:ss"))
// Access individual parts
Print("Year: " + now.Year.ToString())
Print("Month: " + now.Month.ToString())
Print("Day: " + now.Day.ToString())
// Date arithmetic
Var nextWeek As Object = now.AddDays(7)
Print("Next week: " + nextWeek.Format("yyyy-MM-dd"))
There are over 35 modules in the standard library, covering everything from JSON parsing to graphics, audio synthesis, AI, databases, networking, and much more. You will discover them as you grow as a programmer.
What's Next?
You have learned the fundamentals of programming with Neuridion! Here is a summary of everything you covered:
- Print to display output
- Variables to store data (String, Integer, Double, Boolean)
- Console.ReadLine to get input from the user
- If/ElseIf/Else to make decisions
- For and While loops to repeat actions
- Functions and Subs to organize reusable code
- Arrays to store lists of values
- Objects to store named key-value pairs
- Modules to access powerful built-in functionality
Here is where to go from here:
Explore the Examples
The Welcome screen in Neuridion IDE has dozens of ready-to-run examples organized into categories: Basics, Data & Storage, Text & Language, System & Security, Graphics & Media, and AI & Vision. Open them, run them, and study how they work. Modify them and make them your own.
Read the Language Guide
The Language Guide (available from the Welcome screen or the Help menu) is the complete reference for the Neuridion language. It covers every keyword, every operator, every data type, and every standard library module in detail. When you want to know exactly how something works, that is where to look.
Build Your Own Projects
The best way to learn is to build something you care about. Here are some ideas to get you started:
- A to-do list manager that saves tasks to a file
- A quiz game with multiple categories and score tracking
- A simple calculator with a graphical interface (using the Form module)
- A program that fetches data from the internet (using the Network module)
- A personal diary that stores entries with dates
Happy coding!