Category:Corescript: Difference between revisions
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. |
|||
⚫ | |||
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 |
|||
⚫ | |||
parenthesis, just like Batch. |
|||
⚫ | |||
All the Corescript interpreters/compilers are |
|||
⚫ | |||
available here as open-source: |
|||
⚫ | |||
⚫ | |||
== The Language == |
|||
# Corescript1 |
|||
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. |
|||
Here is a link to an example program: |
|||
https://raw.githubusercontent.com/corescript-lang/explaination/master/programs/classicexample.corescript |
|||
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" |
|||
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
This programming language may be used to instruct a computer to perform a task.
See Also: |
|
---|
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.