I'm working on modernizing Rosetta Code's infrastructure. Starting with communications. Please accept this time-limited open invite to RC's Slack.. --Michael Mol (talk) 20:59, 30 May 2020 (UTC)

Category:XBS

From Rosetta Code
This page is a stub. It needs more information! You can help Rosetta Code by filling it in!
Language
XBS
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 XBS.
Your Help Needed
If you know XBS, please write code for some of the tasks not implemented in XBS.

What is XBS?[edit]

XBS is an interpreted language written in JavaScript. The main purpose of XBS is to provide an easy way to interact with the web.


Details[edit]

XBS has a github page and is currently open-sourced. The github page has a wiki for the documentation; but just know, this language still isn't done. It has most features a programming language has, except for some minor details that I need to fix.

XBS is still under active development, and gets updates/bug fixes almost everyday.


Code Examples[edit]

Variable declaration

set x = "Hello, world!";
log(x)

Functions

func FirstFunction(a,b){
send a+b; #Add a and b
}
log(FirstFunction(1,2));

Typed XBS[edit]

XBS has another version which is typed, and has improved features. Typed XBS allows better function defaults, variable types, function return types, function parameter types, improved expressional parsing, custom datatype methods, and some other features. Currently, typed XBS is implemented in the XBS Code Editor, which can be found in the links category.

func Add(a:number=1,b:number=2):number{
send a+b; #Add a & b
}
 
log(Add(2,2));
log(Add());
set String = "Hello, world!";
log(String::reverse())

Links[edit]

Github
XBS Code Editor

Notes[edit]

The XBS code editor uses a different version of XBS. To see more into details, the code editor explains it on the page.