Category:Corescript: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(describe print)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{language}}
Corescript is a simple interpreted language that has been implemented in several languages.
Github: https://github.com/corescript-lang


Corescript is a simple programming language inspired
It is based off of Microsoft Batch and Javascript.
by Windows Batch, JS, and MIT's Scratch.
The initial version, Corescript0, has a very bare bones syntax, and
is limited on what it can do.
```
input name = What's your name?
:top
print Hello, (name)!
print Hello, World!
goto top
```


The main idea was to work with `print Hello World`. No
The first version, implemented in 2017, leaned toward Scratch's
parenthesis, just like Batch.
design.


All the Corescript interpreters/compilers are
The first version was implemented in Javascript as an online tool,
available here as open-source:
but later versions were implemented in C#, Go, and C.
https://github.com/corescript-lang


== The Language ==
# Corescript1
For Corescript to be more flexible and usable, a better
The initial version, Corescript 0, has a very bare bones syntax,
yet is very simple and easy to learn.
version had to be implemented. It should maintain the same ideas
as the original version, but be able to do complex things like Python.


This page is unfinished, so here is a text example of
Here is a link to an example program:
https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/classicexample.corescript
what Corescript1 will look like:


The first version, implemented in May 2017, leaned toward Scratch's
```
design.
# This is an array
var names = ["Jim", "Bob"]


The first version was implemented in Javascript as an online tool,
# This is a function
but later versions were also implemented in C#, Go, and C.
function printNames:
loop names as name:
print name

# Print names
printNames names

# Print first name
function firstName array:
return array[0]

var name = firstName names
if name = "Bob":
print "First name is Bob"


The new JS version has been released and can be used here:
# This is a 10x10 hashtag cube
https://corescript-lang.github.io/editor/
repeat 10:
repeat 10:
print "#"
print "\n"
# Functions such as print, var are reserved
function print string:
print string
# Output: Reserved function name
```

Latest revision as of 14:38, 18 September 2020

Language
Corescript
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Corescript.

Corescript is a simple programming language inspired by Windows Batch, JS, and MIT's Scratch.

The main idea was to work with `print Hello World`. No parenthesis, just like Batch.

All the Corescript interpreters/compilers are available here as open-source: https://github.com/corescript-lang

The Language

The initial version, Corescript 0, has a very bare bones syntax, yet is very simple and easy to learn.

Here is a link to an example program: https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/classicexample.corescript

The first version, implemented in May 2017, leaned toward Scratch's design.

The first version was implemented in Javascript as an online tool, but later versions were also implemented in C#, Go, and C.

The new JS version has been released and can be used here: https://corescript-lang.github.io/editor/

Pages in category "Corescript"

The following 4 pages are in this category, out of 4 total.