Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 6, 2022 09:13 pm GMT

Gold-Language - Medium Rare Update; Officially Out Now!

Wanting To Check out the Language? Go Here - Gold

Major Update!

Finally! An Gigantic Update adding tons of new features to Gold! The Medium Rare Update, (Named after Eggs, I know.) is an update that finally adds Functions to the Gold programming language!

This allows you to create wild new Programs with Gold, so lets jump right in.

Overview

Functions, or Eggs as its referred to in the Interpreter, allow you to add snippets of code that can be accessed anywhere in the code. So your gold Program would work like this:

var myGoldProgram = {    name: "Example Gold Program",    des: "An Example Gold Program for the README file.",    int: "regInt",    ex: [        {            fun: "egg",            eFun: "log",            val1: "Hello World!"        },        {            fun: "shell"        },        {            fun: "end"        }    ]};export { myGoldProgram };

And the output for that Program would be:

Hello World!

You can pretty much do anything that the regular Gold language can do, writing to variables, logging things, etc.

Talking about writing to Variables, there is a new system that you might want to use!

Inputs and Outputs

Another addition in this update are Inputs and Outputs!

In the first post I made, you might remember me talking about how my friend talked about making my own coding language, but he also recommended the other day that I implement Inputs.

So, taking advice from him, you can now use inputs in your programs.

First, your program;

var myGoldProgram = {    name: "Example Gold Program",    des: "An Example Gold Program for the README file.",    int: "regInt",    ex: [        {            fun: "input",            slot: 0        },    {        fun: "logVar",        slot: 0        {            fun: "end"        }    ]};export { myGoldProgram };

Second, your node command;

npm run regInt Colack

Finally, your output;

Colack

This system can let you do cool things, like get names, and log those names!

You could also probably make an calculator with this. Who knows :)

Finalizing

That just about wraps up this Major Update!

Don't forget, you can always check out the language here

Wanting to Contact Me? Join my Discord Server!

The English Interpreter is not up-to-date with this Current Update, so its running on the 1.02 update. (Sorry about that...)

  • Colack/

Original Link: https://dev.to/colack/gold-language-medium-rare-update-officially-out-now-5hko

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To