JayMo:




Output:

Short reference

Hello world!

Print "Hello world!"
Classic
"Hello world!".print
Flow

General

AlphaBravo
Type
ALPHA_BRAVO
Constant
alphaBravo
alphaBravo?
Int alphaBravo
Variable (default)
(can be nil)
(with type)
.alphaBravo
Call of an public function

Atomic types

"Alpha Bravo"
String (Str)
'a'
Character (Char)
123
Integer (Int)
123.456
Decimal number (Dec)
true
false
Boolean (Bool)
nil
Nil (Nil)

Magic variables

this
Reference to the current instance
super
Reference to the parent instance
it
Value of the current block
cur
Object of this function
each
Current functional processed object
app
Reference to the instance of the application
jaymo
Reference to the JayMo-Environment

Comments

# Alpha bravo
line comment
/* Alpha bravo */
block comment
#**#
End of script

Control objects (classic)

Echo "Alpha"
Output without line break
Print "Alpha"
Output with line break
Ident "Alpha"
Output the identification of the object
Describe "Alpha"
Output the description of the object

Structures (classic)

If( 321 > 123 )
	Print "Alpha"
.else
	Print "Bravo"
If ... then
Count( 10 )
	Print it
Counting loop
a = 1
While( a <= 5 )
	Print a
	a =++
While loop
a = 1
Repeat( a <= 5 )
	Print a
	a =++
Repeat loop
list = [3,6,9,12,15]
Each( list )
	 Print it
Each loop
For( a=1, a < 5, a=++)
	Print a
For loop
Loop
	Print 123
	Break
Endless loop
Try
	Print 123 / 0
.catch
	Print it
Catching errors
::myFunction(Int a, Int b)
	Return a * b

Print this.myFunction(3,5)
Function definition
::MyType(Int a, Int b)
	::show
		Print a + b

MyType(2,4).show
Type definition

Structures (flow)

10.times.print
Counting loop
[3,6,9,12,15].each.print
Each loop
::myFunction(a, b) = a * b

this.myFunction(3,5).print
Function definition in single line
::myFunction(a, b)
	Return a * b

this.myFunction(3,5).print
Function definition multiline
::MyType(a, b)
	::show
		"A: {}, B: {}".fill(a,b).print

MyType(2,4).show
Type definition

 

Sponsor

The development of "JayMo" is currently only possible through personal initiative.

Received:  0 €