Check Out Jinx

Want to see what the Jinx language looks like?  Here we show off a few examples to give you an idea of the look and feel of the language.

Hello World!

Let’s start with the traditional “hello world” program.  We see a few basic features of the language here, such as how to import a library, single line comments, and basic output logging.  Unlike many language, Jinx imposes no significant restriction on the use of whitespace in variables and function names.  Note that the “write line” function contains a space in the name. -- Use the core library import core -- Write to the default output write line "Hello, world!"

Assignments and Types

There are six common types used in Jinx, as well as a few lesser-used types.  Here we assign six constant values to six variables, all of different types. set var1 to null                   -- null type set var2 to 123.456                -- number type set var3 to 42                     -- integer type set var4 to false                  -- boolean type set var5 to "a string value"       -- string type set var6 to "red", "green", "blue" -- collection type

FizzBuzz

In this example, we demonstrate basic function syntax, loops and if-branching, as well as an example of a variable with whitespace in the name.  The program is an implementation of “FizzBuzz”, a game in which the words “Fizz” or “Buzz” are called out based on the whether a particular number in a sequence is divisible by 3 or 5.  Note how the Jinx script compares to the examples in the Wikipedia article on pseudocode, which happens to demonstrate this particular code in various pseudocode styles.  Jinx was intentionally designed to look similar to traditional forms of pseudocode, eschewing complex symbols and functionality in favor of simplicity and straightforward syntax. import core function {integer x} is divisible by {integer y}     return x % y = 0 end loop i from 1 to 100     set print number to true     if i is divisible by 3         write "Fizz"         set print number to false     end     if i is divisible by 5         write "Buzz"         set print number to false     end     if print number         write i     end     write newline     wait end
Copyright © 2023 James Boer  All Rights Reserved

Check Out Jinx

Want to see what the Jinx language looks like?  Here we show off a few examples to give you an idea of the look and feel of the language.

Hello World!

Let’s start with the traditional “hello world” program.  We see a few basic features of the language here, such as how to import a library, single line comments, and basic output logging.  Unlike many language, Jinx imposes no significant restriction on the use of whitespace in variables and function names.  Note that the “write line” function contains a space in the name. -- Use the core library import core -- Write to the default output write line "Hello, world!"

Assignments and Types

There are six common types used in Jinx, as well as a few lesser-used types.  Here we assign six constant values to six variables, all of different types. set var1 to null                   -- null type set var2 to 123.456                -- number type set var3 to 42                     -- integer type set var4 to false                  -- boolean type set var5 to "a string value"       -- string type set var6 to "red", "green", "blue" -- collection type

FizzBuzz

In this example, we demonstrate basic function syntax, loops and if- branching, as well as an example of a variable with whitespace in the name.  The program is an implementation of “FizzBuzz”, a game in which the words “Fizz” or “Buzz” are called out based on the whether a particular number in a sequence is divisible by 3 or 5.  Note how the Jinx script compares to the examples in the Wikipedia article on pseudocode, which happens to demonstrate this particular code in various pseudocode styles.  Jinx was intentionally designed to look similar to traditional forms of pseudocode, eschewing complex symbols and functionality in favor of simplicity and straightforward syntax. import core function {integer x} is divisible by {integer y}     return x % y = 0 end loop i from 1 to 100     set print number to true     if i is divisible by 3         write "Fizz"         set print number to false     end     if i is divisible by 5         write "Buzz"         set print number to false     end     if print number         write i     end     write newline     wait end
Copyright © 2023 James Boer  All Rights Reserved

Examples