Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/magayaga/microscript

The MicroScript programming language
https://github.com/magayaga/microscript

Last synced: 18 days ago
JSON representation

The MicroScript programming language

Awesome Lists containing this project

README

        

# MicroScript

**MicroScript**, often abbreviated as **MUS** and **μs** is a high-level programming language. It was originally written in **Java** programming language.

## Examples

### "Hello, World!" program

The following shows how a **"Hello, World!"** program is written in MicroScript programming language:

```js
// "Hello, World!" program
console.write("Hello, World!");
```

### Arithmetic expressions

The following shows how to the addition, substraction, multiplication, and division program using MicroScript programming language:

```js
// Adding numbers
console.write(25 + 19);

// Subtracting numbers
console.write(36 - 14);

// Multiplying numbers
console.write(45 * 12);

// Dividing numbers
console.write(1028 / 16);
```

### Function

The following shows how a **"Hello, World!"** program with function is written in MicroScript programming language:

```js
// Function to compute the "Hello, World!" program
function main() {
console.write("Hello, World!");
return 0;
};

main();
```

The following shows how a **square** function is written in MicroScript programming language:

```js
// Function to compute the square
function square(number) {
return number * number;
}

// Main function
function main() {
console.write(square(14));
};

main();
```

### Call main function

```js
main();
```

This executes the `main` function, starting the program.

## Copyright

Copyright (c) 2024-2025 [Cyril John Magayaga](https://github.com/magayaga). icensed under the [MIT license](LICENSE).