Category:Corescript: Difference between revisions
(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.
- 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:
```
- 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
```
Pages in category "Corescript"
The following 4 pages are in this category, out of 4 total.