Category:Corescript: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "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...")
 
No edit summary
Line 57: Line 57:
print string
print string
# Output: Reserved function name
# Output: Reserved function name
```

Revision as of 21:15, 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. ``` 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 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:

```

  1. This is an array

var names = ["Jim", "Bob"]

  1. This is a function

function printNames:

  loop names as name:
     print name
  1. Print names

printNames names

  1. Print first name

function firstName array:

  return array[0]

var name = firstName names if name = "Bob":

  print "First name is Bob"
  1. This is a 10x10 hashtag cube

repeat 10:

  repeat 10:
     print "#"
  print "\n"
  1. Functions such as print, var are reserved

function print string:

  print string
  1. Output: Reserved function name

```

Pages in category "Corescript"

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