Category:Corescript: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Final edit hopefully.)
Line 1: Line 1:
<nowiki>Corescript is a simple interpreted language that has been implemented in several languages.
Corescript is a simple interpreted language that has been implemented in several languages.
Github: https://github.com/corescript-lang
Github: https://github.com/corescript-lang


Line 5: Line 5:
The initial version, Corescript0, has a very bare bones syntax, and
The initial version, Corescript0, has a very bare bones syntax, and
is limited on what it can do.
is limited on what it can do.

```
https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/classicexample.corescript
input name = What's your name?
:top
print Hello, (name)!
print Hello, World!
goto top
```


The first version, implemented in 2017, leaned toward Scratch's
The first version, implemented in 2017, leaned toward Scratch's
Line 27: Line 22:
what Corescript1 will look like:
what Corescript1 will look like:


https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/modernexample.corescript
```
# This is an array
var names = ["Jim", "Bob"]

# This is a function
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"

# This is a 10x10 hashtag cube
repeat 10:
repeat 10:
print "#"
print "\n"
# Functions such as print, var are reserved
function print string:
print string
# Output: Reserved function name
```
</nowiki>

Revision as of 21:20, 14 May 2020

Corescript is a simple interpreted language that has been implemented in several languages. Github: https://github.com/corescript-lang

It is based off of Microsoft Batch and Javascript. The initial version, Corescript0, has a very bare bones syntax, and is limited on what it can do.

https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/classicexample.corescript

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

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

  1. Corescript1

For Corescript to be more flexible and usable, a better 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 what Corescript1 will look like:

https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/modernexample.corescript

Pages in category "Corescript"

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