Share your repls and programming experiences

← Back to all posts
The Gizmo Programming Language!
ELDER054

Gizmo

Gizmo is a fast and user friendly language for manipulating or parsing strings. It may not be much to look at yet, but the key word there is yet.

Gizmo is in active development by the developers. For now, I'll tell you about what Gizmo can do currently.

Input and Output!

Using the read and write functions, you can get either input or output. (You can probably guess which one does which).
Here's an example!

You can put an argument of any type into the write function.

Variables

Now that we've started talking about types and all that nonsense, we can talk about variables.
Creating a variable in Gizmo takes this format.
<type> <name> = <value>
Some of the different value types in Gizmo are:
1. int (An integer)
2. char (A single character)
3. real (A decimal number)
4. bool (A conditional value, either true or false)
5. string (A "string" of characters)

Strings are surrounded by double quotes:
"This is a string"

Chars are surrounded by single quotes:
"a" or 'a'

Functions

Functions in Gizmo take this format:

You can call them like this:
<name>(<args>)

Conditionals

If statements check if a condition is true.
If it is, it executes the first block of code.
Optionally, you can tell gizmo to do something if the condition is not true using the else keyword.
Using the "else if" keyword, you can check multiple conditions.

Examples:

Curly braces around the blocks inside are only needed if the block is more than one statement long.
I usually include the curly braces just for consistency.

Hope you enjoyed this post!

The github repo link - here

To run the code, enter:

Then check a.ll for the outputted llvm ir code.

Voters
DeadWither
maxina
CosmicBear
AutomationKing
ANDREWVOSS
ELDER054
Comments
hotnewtop
DeadWither

Thanks