Bitte die Suchfunktion des Browsers verwenden.

2019-07-29_bugfix_table.jmo

tab = Table(2)
de = "deutsch"
en = "english"
tab.add(en, de)
tab.print
de = "Deutsch"
tab.set(de, 1,1)
tab.print

2019-08-09_bugfix.jmo

"ab".left(5).print
"cd".right(5).print

2020-02-13_feldwies.jmo

sDate = Date(2020,2,13).style("YYYY/MM/DD")
sDate.print

time = Time(10,24,35)
time.print

While(time.minutes.toStr.right(1).toInt != 0)
	time-=60

time.print
sTime = time.style("hhmm")

l = "https://www.abcdef.com/file/"+sDate+'/'+sTime+"_hd.jpg"
l.print

amount.jmo

s = "ababcabcdabcdeabcdefabcdefg"

##################################################

s.amount( each == 'a' ).print
s.amount( each == 'd' ).print

"-----".print

s.chars.amount( each == 'a').print
s.chars.amount( each == 'f').print

and_or_xor.jmo

(true || true).print
(true || false).print
(false || true).print
(false || false).print

(true && true).print
(true && false).print
(false && true).print
(false && false).print

(true ^^ true).print
(true ^^ false).print
(false ^^ true).print
(false ^^ false).print

(true == true).print
(true == false).print
(false == true).print
(false == false).print

(true != true).print
(true != false).print
(false != true).print
(false != false).print

and_or_xor_2.jmo

(0.toBool && true.print).print
"---".print
(1.toBool && true.print).print
"---".print
(1.toBool || true.print).print
"---".print
(1.toBool && true.not.print).print
"---".print
(true.not.or(true).print ^^ 1.sub(1).toBool).print

app_event_exit_1.jmo

app::@exit
	"This is the end".print

"foo".print

app_event_exit_2.jmo

app::@exit
	"This is the end".print

"foo".print
app.exit
"bla".print

app_event_exit_3.jmo

app::@exit
	"This is the end".print

"foo".print
app.exit(1)
"bla".print

app_event_exit_3b.jmo

"foo".print

app::@exit
	"This is the end".print

this._sleep(100)

"bak".print

app_event_exit_4.jmo

"foo".print

app::@exit
	"This is the end".print

this.async
	"Thread 1 start".print
	this._sleep(100)
	"Thread 1 end".print

this._sleep(50)

this.async
	"Thread 2 start".print
	this._sleep(200)
	"Thread 2 end".print

"bak".print

app_event_exit_5.jmo

a = 1

app::@exit
	"Exit".print

:a::@varChanged
	"Event start".print
	this._sleep(100)
	"Event end".print

a = 2
"Main end".print

app_keep.jmo

counter = 0

::_check
	"cycle".print
	counter =++
	If(counter >= 5)
		app.exit

Cycle.start( 10 )::@cycle
	this._check

app.keep

article_for_programmers.jmo

If( 5 == 3+2 )
	"It's true".print
.else
	"It's not true".print
	
Count(10, 20, 2)
	it.print

a=true	
While(a)
	"Print this endless".print
	a=false

If( 5 == 3+2 ).then
	"It's true".print
.else
	"It's not true".print

If( 5 == 3+2 ).then.print("It's true")
.else.print("It's not true")

( 5 == 3+2 )
	"It's true".print
.else
	"It's not true".print

( 5 == 3+2 ).if.print("It's true")
.else.print("It's not true")

(5 == 3+2).if
	"It's true".print
.else
	"It's not true".print

true.if
	"It's true".print
.else
	"It's not true".print
	
Count(10, 20).each.print
Count(10, 20, 2).each.print

Count(10, 20).each
	it.print

Count(10, 20).each => b
	b.print

{10,20,2}
	it.print

{10,20}.print
{10,20,2}.print

{10,20,2} => b
	b.print
	
10.times
	it.print

10.times.print

a = true
While(a).each.print(a=false)

a = true
While(a).each
	it.print
	a = false

a = true
While(a)
	it.print
	a = false

a = true
While(a).each.print(a=false)

artikel-offiziell.jmo

"Hallo Welt!".print

"Hallo Welt!".trim('!').split(' ').each.print

If( true ).then
	"Yes".print

a = 5 + 2

If( a > 3 )
	"Ist größer".print
.else
	"Ist kleiner".print

list = [4,7,4,2,1,9,5,3,1]
list.filter( each >= 5 ).print

::mySort(x, y) = x > y
list.sort( :{°mySort} ).print

5.times.print( cur + ". Punkt" )

::test(Int c)
	"Funktion wurde mit {} aufgerufen.".fill(c).print
°test( 5.times... )

::qsort( l )
	If(l.len <= 1).if.pass(§ = l)
	§ = °qsort(l.from(2).filter(each <= l[1])).add(l[1]).concat(°qsort(l.from(2).filter(each > l[1])))

al = Java_ArrayList
al.add( 3 )
al.toString.print

atomic_autoblockfunc.jmo

4
	(it*2).print

"---".print

(2+1).each
	it.print

"---".print	

2.add(1).each
	it.print
	
"---".print

2.add(9).sub(7).div(2).toInt.each
	it.print
	
"---".print

3.print.each
	it.print

"----------------------".print

"yxcvb".chars.print.each
	it.print

"----------------------".print

"qwert"
	it.print

"---".print

"asdfg".left(4).each
	it.print

atomic_auto_up_1.jmo

FORM = "{10}{}"

######################################################################
Print "--- Constructor ---"

::Foo(Short ts, Int ti, Long tl, Str tt)
	Print "------------------"
	Print ts
	Print ti
	Print tl
	Print tt

Foo( 2b, 3b, 4, 9l )
Foo( 1s, 3s, 4s, 'a' )

######################################################################
Print "--- Function ---"

::foo(Short s, Int i, Long l, Str t)
	Print "------------------"
	Print FORM.fill(s.type, s)
	Print FORM.fill(i.type, i)
	Print FORM.fill(l.type, l)
	Print FORM.fill(t.type, t)

this.foo( 2b, 3b, 4, 9l )
this.foo( 1s, 3s, 4s, 'a' )

######################################################################
Print "--- Variablen ---"

Long va = 5l
va = 3
Print FORM.fill(va.type, va)

vi = 4i
vi = 5s
vi = 6b
Print FORM.fill(vi.type, vi)

Str vs = 123.45
vs = 678
Print FORM.fill(vs.type, vs)

######################################################################
Print "--- Const ---"

Long CL = 2
Print FORM.fill(CL.type, CL)

CI = 23b
Print FORM.fill(CI.type, CI)

Str CS = 3.456
Print FORM.fill(CS.type, CS)

atomic_auto_up_2.jmo

FORM = "{10t}{}"

s = 1s
s = 2b
FORM.fill(s,s).print

i = 1i
i = 2b
i = 3s
FORM.fill(i,i).print

l = 1l
l = 2b
l = 3s
l = 4i
FORM.fill(l,l).print

f = 1f
f = 2b
f = 3s
FORM.fill(f,f).print

d = 1d
d = 2b
d = 3s
d = 4i
d = 5c
d = 6f
FORM.fill(d,d).print

t = "1"
t = 2b
t = 3s
t = 4i
t = 5l
t = 6c
t = 7f
t = 8d
t = '9'
FORM.fill(t,t).print

atomic_auto_up_3.jmo

FORM = "{10t}{}"

a = 1a
a = 2b
a = 3s
a = 4i
a = 5l
FORM.fill(a,a).print

c = 1c
c = 2b
c = 3s
c = 4i
FORM.fill(c,c).print

z = 1z
z = 2b
z = 3s
z = 4i
z = 5l
z = 6c
z = 7f
z = 8d
FORM.fill(z,z).print

atomic_bigdec_1.jmo

line = 0

::line( Str comment )
	line=++
	Print "--- " + line + " --- " + comment

::out( x )
	x.type.echo
	"  ".echo
	x.print

#######################################################

1234567890123456789012345678901234567890.321z.describe
this.line ""
this.out( 123z )
this.out( 1234567890123456789012345678901234567890.321z )

this.line "+"
this.out( 123z + 1 )
this.out( 123z + 2z )
this.out( 1234567890123456789012345678901234567890.321z + 2.1z )

this.line "-"
this.out( 123z - 3 )
this.out( 123z - 4z )
this.out( 1234567890123456789012345678901234567890.321z - 8.011z )

this.line "*"
this.out( 123z * 5 )
this.out( 123z * 6z )
this.out( 1234567890123456789012345678901234567890.321z * 2z )

this.line "/"
this.out( 123z / 7 )
this.out( 123z / 8z )
this.out( 1234567890123456789012345678901234567890.322z / 2z )
this.out( 1234567890123456789012345678901234567890.322z / 5z )

this.line "%"
this.out( 123z % 7 )
this.out( 123z % 8z )
this.out( 123.128z % 8z )
this.out( 1234567890123456789012345678901234567890.322z % 3z )
this.out( 1234567890123456789012345678901234567890z % 3z )
this.out( 1234567890123456789012345678901234567890z / 3z )
this.out( 1234567890123456789012345678901234567890.322z % 5z )
this.out( 1234567890123456789012345678901234567890z % 5z )
this.out( 1234567890123456789012345678901234567890z / 5z )
this.out( 1234567890123456789012345678901234567890.322z % 7z )
this.out( 1234567890123456789012345678901234567887z % 7z )
this.out( 1234567890123456789012345678901234567887z / 7z )

this.line "++"
this.out( 123z ++ )
this.out( 123z ++ 7 )
this.out( 123z ++ 8z )
this.out( 1234567890123456789012345678901234567890.321z ++ 123456 )
this.out( 1234567890123456789012345678901234567890.321z ++ 123.456z )
this.out( 1234567890123456789012345678901234567890.321z ++ 123.456 )

this.line "--"
this.out( 123z -- )
this.out( 123z -- 7 )
this.out( 123z -- 8z )
this.out( 1234567890123456789012345678901234567890.321z -- 123456 )
this.out( 1234567890123456789012345678901234567890.321z -- 123.456z )
this.out( 1234567890123456789012345678901234567890.321z -- 123.456 )

this.line "**"
this.out( 123z ** )
this.out( 123z ** 7 )
this.out( 123z ** 20 )
this.out( 123z ** 1.5 )

this.out( 1234567890123456789012345678901234567890.321z ** 3.3456 )
this.out( 1234567890123456789012345678901234567890.321z ** 5 )
this.out( 1234567890123456789012345678901234567890.321z ** 12.3456z )

this.line "//"
this.out( 256z // )
this.out( 256z // 8 )
this.out( 256z // 8z )
this.out( 1234567890123456789012345678901234567890.321z // 12.3456 )
this.out( 1234567890123456789012345678901234567890.321z // 12.3456z )

this.line "neg/abs"
this.out( 256z.neg )
this.out( -256z.neg )
this.out( 256z.abs )
this.out( -256z.abs )

this.line "log"
this.out( 256.log(2) )
this.out( 256z.log(2) )
this.out( 256z.log(2a) )
this.out( 16777216.log(4) )
this.out( 16777216z.log(4a) )
this.out( 16777216z.log(4.0z) )

this.line "mod"
this.out( 256.mod(13) )
this.out( 256z.mod(13) )
this.out( 256z.mod(13a) )
this.out( 16777216.mod(18a) )
this.out( 16777216z.mod(18.0z) )

atomic_bigint_1.jmo

line = 0

::line( Str comment="" )
	line=++
	Print "--- " + line + " --- " + comment

::out( x )
	x.type.toStr.width(10).echo
	x.print

#######################################################

1234567890123456789012345678901234567890a.describe

this.line
this.out( 123a )
this.out( 1234567890123456789012345678901234567890123456789a )

this.line "+"
this.out( 123a + 1 )
this.out( 123a + 2a )
this.out( 1234567890123456789012345678901234567890123456789a + 2a )
this.out( 1234567890123456789012345678901234567890123456789a + 2.1z )
this.out( 1234567890123456789012345678901234567890123456789a + 2.2 )

this.line "-"
this.out( 123a - 3 )
this.out( 123a - 4a )
this.out( 1234567890123456789012345678901234567890123456789a - 8a )
this.out( 1234567890123456789012345678901234567890123456789a - 8.2z )

this.line "*"
this.out( 123a * 5 )
this.out( 123a * 6a )
this.out( 1234567890123456789012345678901234567890123456789a * 2a )

this.line "/"
this.out( 123 / 7 )
this.out( 123a / 7 )
this.out( 123z / 7 )
this.out( 123a / 8a )
this.out( 123456789012345678901234567890123456789a / 2a )
this.out( 123456789012345678901234567890123456789a / 5a )

this.line "%"
this.out( 123a % 7 )
this.out( 123a % 8a )
this.out( 123128a % 8a )
this.out( 123456789012345678901234567890123456789a % 3a )
this.out( 123456789012345678901234567890123456789a % 3a )
this.out( 123456789012345678901234567890123456789a / 3a )
this.out( 123456789012345678901234567890123456789a % 5a )
this.out( 123456789012345678901234567890123456789a % 5a )
this.out( 123456789012345678901234567890123456789a / 5a )
this.out( 123456789012345678901234567890123456789a % 7a )
this.out( 1234567890123456789012345678901234567887a % 7a )
this.out( 1234567890123456789012345678901234567887a / 7a )

this.line "++"
this.out( 123a ++ )
this.out( 123a ++ 7 )
this.out( 123a ++ 8a )
this.out( 1234567890123456789012345678901234567890123456789a ++ 123456a )
this.out( 1234567890123456789012345678901234567890123456789a ++ 123.456z )
this.out( 1234567890123456789012345678901234567890123456789a ++ 123.456 )

this.line "--"
this.out( 123a -- )
this.out( 123a -- 7 )
this.out( 123a -- 8a )
this.out( 1234567890123456789012345678901234567890123456789a -- 123456a )
this.out( 1234567890123456789012345678901234567890123456789a -- 123.456z )
this.out( 1234567890123456789012345678901234567890123456789a -- 123.456 )

this.line "**"
this.out( 123a ** )
this.out( 123a ** 7 )
this.out( 123a ** 20 )
this.out( 123a ** 1.5 )

this.out( 1234567890123456789012345678901234567890123456789a ** 3.3456 )
this.out( 1234567890123456789012345678901234567890123456789a ** 5 )
this.out( 1234567890123456789012345678901234567890123456789a ** 12.3456z )

this.line "//"
this.out( 256a // )
this.out( 256a // 8 )
this.out( 256a // 8a )
this.out( 1234567890123456789012345678901234567890123456789a // 12.3456 )
this.out( 1234567890123456789012345678901234567890123456789a // 12.3456z )

this.line "neg/abs"
this.out( 256a.neg )
this.out( -256a.neg )
this.out( 256a.abs )
this.out( -256a.abs )

this.line "log"
this.out( 256.log(2) )
this.out( 256a.log(2) )
this.out( 256a.log(2a) )
this.out( 16777216.log(4) )
this.out( 16777216a.log(4a) )
this.out( 16777216a.log(4.0z) )

this.line "mod"
this.out( 256.mod(13) )
this.out( 256a.mod(13) )
this.out( 256a.mod(13a) )
this.out( 16777216.mod(18a) )
this.out( 16777216a.mod(18.0z) )

atomic_constants.jmo

::show( Atomic a? )
	a.type.print

	Try
		"  Min: ".echo
		a.MIN_VALUE.describe
	.catch.info.print
	Try
		"  Max: ".echo
		a.MAX_VALUE.describe
	.catch.info.print

this.show(0b)
this.show(0s)
this.show(0i)
this.show(0l)
this.show(0c)
this.show(0f)
this.show(0d)
this.show('a')
this.show(true)
this.show("")
this.show(0a)
this.show(0z)
this.show(nil)

atomic_convert.jmo

::test(v)
	("----- "+v.toStr+" -----").print
	v.try
		it.toBool.print
	.catch.detail.print
	v.try
		it.toStr.print
	.catch.detail.print
	v.try
		it.toInt.print
	.catch.detail.print
	v.try
		it.toChar.print
	.catch.detail.print
	v.try
		it.toDec.print
	.catch.detail.print

°test(true)
°test(false)
°test(-1)
°test(0)
°test(1)
°test(2)
°test('a')
°test('Z')
°test('0')
°test('1')
°test("string")
°test("")
°test("true")
°test("false")
°test("abcdef")
°test(0.1)
°test(1.0)
°test(-4.2)
°test(4.2)
°test(0.0)

atomic_convert_bigdec.jmo

true.toBigDec.describe
12b.toBigDec.describe
123s.toBigDec.describe
1234.toBigDec.describe
1234i.toBigDec.describe
123456l.toBigDec.describe
12345678a.toBigDec.describe
1234.5678.toBigDec.describe
1234.5678c.toBigDec.describe
1234.5678f.toBigDec.describe
1234.5678d.toBigDec.describe
1234.5678z.toBigDec.describe
'3'.toBigDec.describe
"123.456".toBigDec.describe

Print '-'*70

123.456z.toBool.describe
123.456z.toByte.describe
123.456z.toShort.describe
123.456z.toInt.describe
123.456z.toLong.describe
123.456z.toBigInt.describe
123.456z.toDec.describe
123.456z.toFloat.describe
123.456z.toDouble.describe
123.456z.toBigDec.describe
6.0z.toChar.describe
123.456z.toStr.describe

atomic_convert_bigint.jmo

true.toBigInt.describe
12b.toBigInt.describe
123s.toBigInt.describe
1234.toBigInt.describe
1234i.toBigInt.describe
123456l.toBigInt.describe
12345678a.toBigInt.describe
1234.5678.toBigInt.describe
1234.5678c.toBigInt.describe
1234.5678f.toBigInt.describe
1234.5678d.toBigInt.describe
1234.5678z.toBigInt.describe
'3'.toBigInt.describe
"123.456".toBigInt.describe

Print '-'*70

123456a.toBool.describe
123a.toByte.describe
12345a.toShort.describe
123456a.toInt.describe
123456a.toLong.describe
123456a.toBigInt.describe
123456a.toDec.describe
123456a.toFloat.describe
123456a.toDouble.describe
123456a.toBigDec.describe
6a.toChar.describe
123456a.toStr.describe

atomic_convert_bool.jmo

true.toBool.describe
12b.toBool.describe
123s.toBool.describe
1234.toBool.describe
1234i.toBool.describe
123456l.toBool.describe
12345678a.toBool.describe
1234.5678.toBool.describe
1234.5678c.toBool.describe
1234.5678f.toBool.describe
1234.5678d.toBool.describe
1234.5678z.toBool.describe
'3'.toBool.describe
"123.456".toBool.describe

Print '-'*70

false.toBool.describe
0b.toBool.describe
0s.toBool.describe
0.toBool.describe
0i.toBool.describe
0l.toBool.describe
0a.toBool.describe
0.0.toBool.describe
0c.toBool.describe
0f.toBool.describe
0d.toBool.describe
0z.toBool.describe
'0'.toBool.describe
"0".toBool.describe

Print '-'*70

true.toBool.describe
true.toByte.describe
true.toShort.describe
true.toInt.describe
true.toLong.describe
true.toBigInt.describe
true.toDec.describe
true.toFloat.describe
true.toDouble.describe
true.toBigDec.describe
true.toChar.describe
true.toStr.describe

Print '-'*70

false.toBool.describe
false.toByte.describe
false.toShort.describe
false.toInt.describe
false.toLong.describe
false.toBigInt.describe
false.toDec.describe
false.toFloat.describe
false.toDouble.describe
false.toBigDec.describe
false.toChar.describe
false.toStr.describe

atomic_convert_byte.jmo

true.toByte.describe
12b.toByte.describe
123s.toByte.describe
123.toByte.describe
123i.toByte.describe
123l.toByte.describe
123a.toByte.describe
123.5678.toByte.describe
123.5678c.toByte.describe
123.5678f.toByte.describe
123.5678d.toByte.describe
123.5678z.toByte.describe
'3'.toByte.describe
"123.456".toByte.describe

Print '-'*70

123b.toBool.describe
123b.toByte.describe
123b.toShort.describe
123b.toInt.describe
123b.toLong.describe
123b.toBigInt.describe
123b.toDec.describe
123b.toFloat.describe
123b.toDouble.describe
123b.toBigDec.describe
6b.toChar.describe
123b.toStr.describe

atomic_convert_char.jmo

true.toChar.describe
2b.toChar.describe
2s.toChar.describe
2.toChar.describe
2i.toChar.describe
2l.toChar.describe
2a.toChar.describe
2.0.toChar.describe
2.0c.toChar.describe
2.0f.toChar.describe
2.0d.toChar.describe
2.0z.toChar.describe
'2'.toChar.describe
"2".toChar.describe

Print '-'*70

'9'.toBool.describe
'9'.toByte.describe
'9'.toShort.describe
'9'.toInt.describe
'9'.toLong.describe
'9'.toBigInt.describe
'9'.toDec.describe
'9'.toFloat.describe
'9'.toDouble.describe
'9'.toBigDec.describe
'9'.toChar.describe
'9'.toStr.describe

atomic_convert_dec.jmo

true.toDec.describe
12b.toDec.describe
123s.toDec.describe
1234.toDec.describe
1234i.toDec.describe
123456l.toDec.describe
12345678a.toDec.describe
1234.5678.toDec.describe
1234.5678c.toDec.describe
1234.5678f.toDec.describe
1234.5678d.toDec.describe
1234.5678z.toDec.describe
'3'.toDec.describe
"123.456".toDec.describe

Print '-'*70

123.456c.toBool.describe
123.456c.toByte.describe
123.456c.toShort.describe
123.456c.toInt.describe
123.456c.toLong.describe
123.456c.toBigInt.describe
123.456c.toDec.describe
123.456c.toFloat.describe
123.456c.toDouble.describe
123.456c.toBigDec.describe
6.0c.toChar.describe
123.456c.toStr.describe

atomic_convert_double.jmo

true.toDouble.describe
12b.toDouble.describe
123s.toDouble.describe
1234.toDouble.describe
1234i.toDouble.describe
123456l.toDouble.describe
12345678a.toDouble.describe
1234.5678.toDouble.describe
1234.5678c.toDouble.describe
1234.5678f.toDouble.describe
1234.5678d.toDouble.describe
1234.5678z.toDouble.describe
'3'.toDouble.describe
"123.456".toDouble.describe

Print '-'*70

123.456d.toBool.describe
123.456d.toByte.describe
123.456d.toShort.describe
123.456d.toInt.describe
123.456d.toLong.describe
123.456d.toBigInt.describe
123.456d.toDec.describe
123.456d.toFloat.describe
123.456d.toDouble.describe
123.456d.toBigDec.describe
6.0d.toChar.describe
123.456d.toStr.describe

atomic_convert_float.jmo

true.toFloat.describe
12b.toFloat.describe
123s.toFloat.describe
1234.toFloat.describe
1234i.toFloat.describe
123456l.toFloat.describe
12345678a.toFloat.describe
1234.5678.toFloat.describe
1234.5678c.toFloat.describe
1234.5678f.toFloat.describe
1234.5678d.toFloat.describe
1234.5678z.toFloat.describe
'3'.toFloat.describe
"123.456".toFloat.describe

Print '-'*70

123.456f.toBool.describe
123.456f.toByte.describe
123.456f.toShort.describe
123.456f.toInt.describe
123.456f.toLong.describe
123.456f.toBigInt.describe
123.456f.toDec.describe
123.456f.toFloat.describe
123.456f.toDouble.describe
123.456f.toBigDec.describe
6.0f.toChar.describe
123.456f.toStr.describe

atomic_convert_int.jmo

true.toInt.describe
12b.toInt.describe
123s.toInt.describe
1234.toInt.describe
1234i.toInt.describe
123456l.toInt.describe
12345678a.toInt.describe
1234.5678.toInt.describe
1234.5678c.toInt.describe
1234.5678f.toInt.describe
1234.5678d.toInt.describe
1234.5678z.toInt.describe
'3'.toInt.describe
"123.456".toInt.describe

Print '-'*70

123456i.toBool.describe
123i.toByte.describe
12345i.toShort.describe
123456i.toInt.describe
123456i.toLong.describe
123456i.toBigInt.describe
123456i.toDec.describe
123456i.toFloat.describe
123456i.toDouble.describe
123456i.toBigDec.describe
6i.toChar.describe
123456i.toStr.describe

atomic_convert_long.jmo

true.toLong.describe
12b.toLong.describe
123s.toLong.describe
1234.toLong.describe
1234i.toLong.describe
123456l.toLong.describe
12345678a.toLong.describe
1234.5678.toLong.describe
1234.5678c.toLong.describe
1234.5678f.toLong.describe
1234.5678d.toLong.describe
1234.5678z.toLong.describe
'3'.toLong.describe
"123.456".toLong.describe

Print '-'*70

123456l.toBool.describe
123l.toByte.describe
12345l.toShort.describe
123456l.toInt.describe
123456l.toLong.describe
123456l.toBigInt.describe
123456l.toDec.describe
123456l.toFloat.describe
123456l.toDouble.describe
123456l.toBigDec.describe
6l.toChar.describe
123456l.toStr.describe

atomic_convert_short.jmo

true.toShort.describe
12b.toShort.describe
123s.toShort.describe
1234.toShort.describe
1234i.toShort.describe
12345l.toShort.describe
12345a.toShort.describe
1234.5678.toShort.describe
1234.5678c.toShort.describe
1234.5678f.toShort.describe
1234.5678d.toShort.describe
1234.5678z.toShort.describe
'3'.toShort.describe
"123.456".toShort.describe

Print '-'*70

12345s.toBool.describe
123s.toByte.describe
12345s.toShort.describe
12345s.toInt.describe
12345s.toLong.describe
12345s.toBigInt.describe
12345s.toDec.describe
12345s.toFloat.describe
12345s.toDouble.describe
12345s.toBigDec.describe
6s.toChar.describe
12345s.toStr.describe

atomic_convert_str.jmo

true.toStr.describe
12b.toStr.describe
123s.toStr.describe
1234.toStr.describe
1234i.toStr.describe
123456l.toStr.describe
12345678a.toStr.describe
1234.5678.toStr.describe
1234.5678c.toStr.describe
1234.5678f.toStr.describe
1234.5678d.toStr.describe
1234.5678z.toStr.describe
'3'.toStr.describe
"123.456".toStr.describe

Print '-'*70

"123".toBool.describe
"123".toByte.describe
"123".toShort.describe
"123".toInt.describe
"123".toLong.describe
"123".toBigInt.describe
"123".toDec.describe
"123".toFloat.describe
"123".toDouble.describe
"123".toBigDec.describe
"6".toChar.describe
"123".toStr.describe

atomic_for.jmo

7.for( each >= 1, each--)
	it.print

"-----".print

i = 4
7.for( i<9, i=++).print

"-----".print

i = 4
i.for( i<9, i=++).print

"-----".print

# Argument von Typ und Funktion müssen identisch verwendbar und auch programmierbar sein.

For(i=1, i<5, i=++).each.print
"-----".print
For(1, each < 5, each++).each.print
"-----".print
1.for(each < 5, each++).print
"-----".print
i=1
i.for(i < 5, i=++).print

atomic_format.jmo

F = "|{5}|{3s}|{3i}|{5^d}|{}|"

5.format(F).print
1.2.format(F).print
'9'.format(F).print
true.format(F).print

"abc".format("|{5}|{3s}|{3c}|{5^}|{}|").print

"{}".fill('a').print

atomic_javatypes.jmo

1.toByte.type.print
1.toByte.print

2.toShort.type.print
2.toShort.print

3.toLong.type.print
3.toLong.print

4.toFloat.type.print
4.toFloat.print

5b.type.print
5b.print

6s.type.print
6s.print

7l.type.print
7l.print

9c.type.print
9c.print
9.123c.type.print
9.123c.print

8f.type.print
8f.print

8.912f.type.print
8.912f.print

9d.type.print
9d.print
9.123d.type.print
9.123d.print

atomic_len.jmo

# .len for all atomic types

1234.print.len.print		# 4
123.456.print.len.print	# 6
'g'.print.len.print 		# 1
5f.print.len.print
true.print.len.print
false.print.len.print

12345l.print.length.print
5.3f.print.length.print
44s.print.len.print
22b.print.len.print

atomic_methodnames.jmo

5.isLess(9).print
5.isGreater(9).print
5.isLessOrEqual(5).print
5.isGreaterOrEqual(9).print
5.isEqual(5).print
5.equals(9).print
5.isEqual(9)!.print
5.differs(5).print

5.bitAnd(2).print
5.bitOr(2).print
5.bitXor(2).print
5.shiftLeft(2).print
5.shiftRight(2).print

atomic_minmax_2.jmo

Describe false
Describe true
Print
Describe -128b
Describe 127b
Print
Describe -32768s
Describe 32767s
Print
Describe -2147483648i
Describe 2147483647i
Print
Describe -9223372036854775808l
Describe 9223372036854775807l
Print
Describe -9223372036.854775808c
Describe 9223372036.854775807c
Print
Describe 1.4E-45f
Describe 3.4028235E38f
Print
Describe -infinity
Describe +infinity
Print
Describe '\u0000'
Describe '\uffff'
Print
Describe ""

atomic_power.jmo

>lazyErrors

v = [2b, 3s, 4i, 5l, 6a, 2c, 7f, 8d, 9z]
tab = Table( v.len )

v.len.times
	tab.addRow( [].init(v.len, nil ) )

::test( Int x, Int y )
	Number b = v[x]
	Number a = v[y]

	"{4} ** {4} = ".fill( a.toIdent, b.toIdent ).echo
	Try
		p = a ** b
		Describe p
		tab.set( p, x, y)
	.catch.info.print

Count(v.len) \\ px
	Count(v.len) \\ py
		this.test( px, py )

Print '-'*80

tab.setTitles( "Byte","Short","Int","Long","BigInt","Dec","Float","Double","BigDec" )
tab.describe

atomic_power_2.jmo

>lazyErrors

v = [2b, 3s, 4i, 5l, 6a, 2c, 7f, 8d, 9z]

::test( Int x )
	Number a = v[x]

	"{4} **  = ".fill( a.toIdent ).echo
	Try
		p = a **
		Describe p
	.catch.info.print

Count(v.len)
	this.test( it )

atomic_prio.jmo



::test(a,b)
	c = a+b
	"{5} + {5} = {6} {5}".fill(a,b,c.type,c).print

l=["s",'c',1.2,3,true,false]
°test(l.each..., l.each...)

atomic_prio_add.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("BigInt", "BigInt")
.add("Dec",    "Dec")
.add("Float",  "Double")
.add("Double", "Double")
.add("BigDec", "BigDec")
.add("Char",   "Str")
.add("Str",    "Str")

::test(a, b)
	c = a+b
	"{5} + {5} = {6} {}".fill(a, b, c.type, c).print
	typeA = a.type.name
	typeB = b.type.name
	typeC = c.type.name
	
	col = tab.column(1)
	pa = col.search(typeA)
	pb = col.search(typeB)
	pm = [pa,pb].max
	should = tab[pm][2]
	isDecimal = a.inherits("DecNumber") || b.inherits("DecNumber")
	
	If( should == "Dec" )
		If(typeA=="Long" || typeB=="Long")
			should = "Double"

	If( should != "Str" && typeA.contains("Big") || typeB.contains("Big"))
		should = isDecimal.use("BigDec", "BigInt")

	If( typeC != should )
		"{} + {} = {} (Should be: {})".fill(typeA,typeB,typeC,should).print
		app.exit
	

l = [false, true, 1b, 2s, 3, 8l, 9a, 3.5c, 4.5f, 6.7d, 7.8z, 'c', "uvw"]
°test(l.each..., l.each...)

atomic_prio_div.jmo

::test(a, b)
	Object c? = 0
	Try
		c? = a / b
	.catch
		"{5>} / {5>} = {}".fill(a.toDescribe, b.toDescribe, it.detail).print
		§return

	"{5>} / {5>} = {8<} {<}".fill(a.toDescribe, b.toDescribe, c?.type, c?.toDescribe).print

l = [1b, 2s, 4i, 5l, 8a, 1.0c, 2.0f, 4.0d, 5.0z, 'c', "uvw"]  #false, true,
°test(l.each..., l.each...)

atomic_prio_mul.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("BigInt", "BigInt")
.add("Dec",    "Dec")
.add("Float",  "Double")
.add("Double", "Double")
.add("BigDec", "BigDec")
.add("Char",   "Str")
.add("Str",    "Str")

::test(a, b)
	Object c? = 0
	Try
		c? = a*b
	.catch
		"{5} * {5} = {}".fill(a, b, it.detail).print
		Return
	
	"{5} * {5} = {6} {}".fill(a, b, c?.type, c?).print
	typeA = a.type.name
	typeB = b.type.name
	typeC = c?.type.name
	
	col = tab.column(1)
	pa = col.search(typeA)
	pb = col.search(typeB)
	pm = [pa,pb].max
	should = tab[pm][2]
	isDecimal = a.inherits("DecNumber") || b.inherits("DecNumber")
	
	If( should == "Dec" )
		If(typeA=="Long" || typeB=="Long")
			should = "Double"

	If( should != "Str" && typeA.contains("Big") || typeB.contains("Big"))
		should = isDecimal.use("BigDec", "BigInt")

	If( typeC != should )
		"{} * {} = {} (Should be: {})".fill(typeA,typeB,typeC,should).print
		app.exit
	

l = [1b, 2s, 3, 8l, 9a, 3.5c, 4.5f, 6.7d, 7.8z, 'c', "uvw"]  #false, true, 
°test(l.each..., l.each...)

atomic_prio_sub.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("BigInt", "BigInt")
.add("Dec",    "Dec")
.add("Float",  "Double")
.add("Double", "Double")
.add("BigDec", "BigDec")
.add("Char",   "Str")
.add("Str",    "Str")

::test(a, b)
	Object c? = 0
	Try
		c? = a-b
	.catch
		"{5} - {5} = {}".fill(a, b, it.detail).print
		§return

	"{5} - {5} = {6} {}".fill(a, b, c?.type, c?).print
	typeA = a.type.name
	typeB = b.type.name
	typeC = c?.type.name

	col = tab.column(1)
	pa = col.search(typeA)
	pb = col.search(typeB)
	pm = [pa,pb].max
	should = tab[pm][2]
	isDecimal = a.inherits("DecNumber") || b.inherits("DecNumber")
	
	If( should == "Dec" )
		If(typeA=="Long" || typeB=="Long")
			should = "Double"

	If( should != "Str" && typeA.contains("Big") || typeB.contains("Big"))
		should = isDecimal.use("BigDec", "BigInt")

	If( typeC != should )
		"{} - {} = {} (Should be: {})".fill(typeA,typeB,typeC,should).print
		app.exit

l = [1b, 2s, 3, 8l, 9a, 3.5c, 4.5f, 6.7d, 7.8z, 'c', "uvw"]  #false, true,
°test(l.each..., l.each...)

atomic_repeat.jmo

7.repeat( each > 1 )
	it.print
	loop.lap.proc(:p, "&: "+p).print
	it = it--

"-----".print

b = true
3.repeat( b )
	it.print
	b = loop.lap < 5
	it = it+1

"-----".print

3.repeat( false )
	it.print

"-----".print

3.while( false )
	it.print

"-----".print

3.repeat( :x, x<7 )
	it.print
	it = it+1

"-----".print

3.while( :x, x<7 )
	it.print
	it = it+1

atomic_result_type_table.jmo

t1 = Table(10)
t2 = Table(9)
t3 = Table(3)

t1.add("++","--","abs","neg","**","//","sqrt","root","log10","logn")
t2.add("+","-","*","/","%","**","//","log","root")
t3.add("floor","ceil","round")

::test(Number n)
	l1 = []

	l1.add(n++)
	l1.add(n--)
	l1.add(n.abs)
	l1.add(n.neg)
	l1.add(n**)
	l1.add(n//)
	l1.add(n.sqrt)
	l1.add(n.root)
	l1.add(n.log10)
	l1.add(n.logn)
	#l1.add(n.exp)
	#l1.add(n.cos)
	#l1.add(n.sin)
	#l1.add(n.tan)
	#l1.add(n.acos)
	#l1.add(n.asin)
	#l1.add(n.atan)

	l1 = l1.map(each.toDescribe.right(1))
	t1.add(l1:)

	#################

	l2 = []

	l2.add(n+n)
	l2.add(n-n)
	l2.add(n*n)
	l2.add(n/n)
	l2.add(n%n)
	l2.add(n**n)
	l2.add(n//n)
	l2.add(n.log(n))
	l2.add(n.root(n))

	l2 = l2.map(each.toDescribe.right(1))
	t2.add(l2:)

	#################

	#If(n.isType(<DecNumber>))
	l3 = []
	l3.add(n.floor)
	l3.add(n.ceil)
	l3.add(n.round)

	l3 = l3.map(each.toDescribe.right(1))
	t3.add(l3:)

this.test( 2b )
this.test( 2s )
this.test( 2i )
this.test( 2l )
this.test( 2a )
this.test( 2c )
this.test( 2f )
this.test( 2d )
this.test( 2z )

t1.reverse.rotate.setTitles("","b","s","i","l","a","c","f","d","z").print
Print
t3.reverse.rotate.setTitles("","b","s","i","l","a","c","f","d","z").print
Print
t2.reverse.rotate.setTitles("","b","s","i","l","a","c","f","d","z").print

atomic_toJava.jmo


true.toJava.toString.print
true.toJava.parseBoolean("false").print
3.toJava.parseInt("789").print
Java("Integer").parseInt("789").print

"for".toJava.charAt(1).print
"opq".toJava.toUpperCase.toJava.indexOf("p").print
"opq".toJava.toUpperCase.toJava.indexOf("P").print

"opq".toJava.toUpperCase.toJava.indexOf('Q').print
"OPQ".toJava.indexOf('Q').print

"sdf".toJava.getBytes.length.print
"sdf".toJava.getBytes.get(2).print
"sdf".toJava.getBytes[2].print
"sdf".toJava.getBytes[2] = 101

"---".print
ba = "sdf".toJava.getBytes
ba[2] = 32

ba[0].print
ba[1].print
ba[2].print

atomic_toStr.jmo

tab = Table(4)
tab.add("", "REGULAR", "IDENT", "DESCRIBE")

::test(a)
	desc = a.toDescribe
	tab.add(a.type, a.toStr, a.toIdent, (desc.len < 25).use(desc, "Len: "+desc.len) )

this.test(true)
this.test(1b.MAX_VALUE)
this.test(1s.MAX_VALUE)
this.test(1i.MAX_VALUE)
this.test(1l.MAX_VALUE)
this.test(1l.MAX_VALUE.toBigInt * 2)
this.test(12345678901234567890123456789012345678901234567890123456789012345678901234567890a)
this.test(1c.MAX_VALUE)
this.test(1f.MAX_VALUE)
this.test(1d.MAX_VALUE)
this.test(1E300d)
this.test(1E300d.toBigDec * 2)
this.test(1E300z)
this.test('A')
this.test("ABC")

tab.style("!").print

Print
Describe 12345678901234567890123456789012345678901234567890123456789012345678901234567890a
Print
Describe 1f.MAX_VALUE
Print
Describe 1E300d
Print
Describe 1E300d.toBigDec * 2
Print
Describe 1E300z

atomic_upgrade_at_low.jmo

>low

Long l = 5b
l.describe

atomic_while.jmo

7.while( each > 1 )
	it.print
	loop.lap.proc(:p, "&: "+p).print
	it = it--

"-----".print

b = true
3.while( b )
	it.print
	b = loop.lap < 5
	it = it+1

autotest.jmo

a=AutoTestDummy

a.getTrue.print
a.getFalse.print
a.test.print
a.test(false).print

auto_pass.jmo

'a'.pass
	it.print

"---".print

3
	it.print

"---".print

3.pass
	it.print

"---".print

"abc"
	it.print

"---".print

"abc".pass
	it.print

"---".print

Range(5).toList.pass	# With Auto-Pass: remove ".pass"
	it.print
.print

"---".print

Range(5).toList.each
	it.echo
.print

auto_string_get.jmo

i2 = KeyValue("doo", 9)
i2.print

"---".print

m = Map
m.add( "goo", 2 )
m.add( 123, 3 )
m.add( "foo", 11 )
m.add( 'g', 4 )
m.add( i2 )

m.each.print

"---".print

m$foo.print
m.get("foo").print
m["foo"].print
m["foo"].print
l=["foo"]
m.get(:l).print

"---".print

m$goo.print
m$123.print
m$g.print
m$doo.print
m$goo.print

"-----".print

l = [12,34,56,78,90]
l$3.print
l$5.print

auto_varlet.jmo


"abcdef".amount( :b, 'd' > b ).print

"abcdef".mem(:d); d.print

::test(VarLet e)
	e.get.print

g = 2
°test(:g)

base32.jmo

::test(Bool hex, Str s)
	Print "-------------------"
	enc = hex.use(Base32Hex, Base32).encode(s)
	Print enc
	Print hex.use(Base32Hex, Base32).decode(enc).arrange

2.times
	hex = it == 2
	this.test( hex, "" )
	this.test( hex, "f" )
	this.test( hex, "fo" )
	this.test( hex, "foo" )
	this.test( hex, "foob" )
	this.test( hex, "fooba" )
	this.test( hex, "foobar" )
	this.test( hex, "This is a Test" )

Print "++++++++++++++++++++++++++++++++++++++++++++++"

::bytes(Bool hex, ByteArray ba)
	Print "-------------------"
	enc = hex.use(Base32Hex,Base32).encode(ba)
	Print enc
	Print hex.use(Base32Hex,Base32).decode(enc)

b = "foobar".bytes.print
2.times
	hex = it == 2
	this.bytes( hex, b )

base64_image.jmo

""""iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAC4jAAAuIwF4pT92AAAA
B3RJTUUH5QkDCCkJpnGb+QAAAX9JREFUKM/NUj1IQmEUPeajX6G/Bw+CGo14QzhY1uAm1aRjgQQt
WWNLQVtbUFsgDWFDoGTgkEFCYQRhtLxJpSFQepglZGGm1vveuw0fWFENbt3hcu+553Au3GsiIjQS
TWgwGhfohp59zKbuUwBun27du+6dy5139v6XwHT9cL10uHRTvJkZnsm93Om67hgYrWpV16BLluRf
BESk5JRoOppInwr3BU3qfWtr7m7rEtvF9cl10SJ+co0amlqFo/TRdHC6o8XSo5nnOh3jI7P2kSlU
SBf0EivVyfrzlTmzjL55yJvy6vGqN+i1b9kP4vsAatUagMWFRSLSNM3v9wMgxUn5bVKcWImuFF4K
QxtDnj1PuVwGwDMAVVVVVeU1FU9IcVLxRFibWKuwimSRfl4wEAjU69fmsQ7bOUAgIiJKZBK+iC8S
j9QdGGOcGg6HOciZAkcd/Q6baDu7OAMgCAIAwzBisRgAq9X6zZfr8vk8b0OhEN+NMcZHyWTyq4Pp
/z3fB0xx05UZAm5lAAAAAElFTkSuQmCC"""" => data

img = Image( Base64.decode(data) )

img.rotate(180).bytes => ba
Base64.encode(ba).print

big_numbers_1.jmo

Print 100a**100

Print "--------------------------"

Print 123456789012345678901234567890a+123456789012345678901234567890a

Print 123456789012345678901234567890a-123456789012345678901234567890a
Print 123456789012345678901234567890a*123456789012345678901234567890a
Print 123456789012345678901234567890a**2
Print 123456789012345678901234567890a/123456789012345678901234567890a
Print 123456789012345678901234567890a.neg
Print 123456789012345678901234567890a.abs
Print 123456789012345678901234567890a++
Print 123456789012345678901234567890a--
Print 123456789012345678901234567890a**
Print 123456789012345678901234567890a//

Print "--------------------------"

z1 = 12345.6z
z2 = 35.6z

Print z1**z2
Print "45481457950047167612644022071700998418214985001032310671713958754188020508211545634242260009012889948731746441993187007834390742407478270003038633.7981897580816540076034582990385749015271425199585291708879327005902797549689624058343407852209942325020045955642"

Print "--------------------------"

Print 5a**
Print 5a**4
Print 5a.pow
Print 5a.pow(4)

Print 625a//
Print 625a//4
Print 625a.sqrt		# No Argument allowed! SQRT == //2

Print 625.root
Print 625.root(4)

Print "===== Exp ====="
Print 12b.exp
Print 12s.exp
Print 12i.exp
Print 12l.exp
Print 12a.exp
Print 12f.exp
Print 12d.exp
Print 12z.exp

bin_oct_hex.jmo

0b101011.print
0b101010.print

0x3f.print
0xff.print
0x2a.print

0o37.print
0o52.print

block-stream_1.jmo

(true)
	"Is true".print
.print

(false)
	"Is true".print
.print

(1==1)
	"Eins".print
.print

(1==2)
	"Eins".print
.print

(2==2).if
	"Zwei".print
.print

(2==3).if
	"Zwei".print
.print

######################

(8==8)
	"Ja0".print
.else
	"Nein0".print

(8!=8)
	"Ja1".print
.else
	"Nein1".print

(9==9).if
	"Ja2".print
.else
	"Nein2".print

(9!=9).if
	"Ja3".print
.else
	"Nein3".print

#########################

true.if
	"1".print
.else
	"-1".print

(true)
	"2".print
.else
	"-2".print

(true).if
	"3".print
.else
	"-3".print

(false)
	"4".print
.else
	"-4".print

#########################

{1,3}
	it.print
.add(4).print

Count(4,6).each
	it.print
.mul(3).print

#########################

x=true
While(x)
	"Jo".print
	x=false
.else
	"No".print

y=true
While(y)
	"Jo2".print
	y=false
.print

z=1
While(z<3)
	("Nr"+z).print
	z =++
.print

x2=true
x3 = While(x2).each
	"Jo3".print
	x2=false
.print
x3.print

block-stream_2.jmo

('a'..'h').each
	it.echo
.print

('i'..'m').each.echo
"".print

('n'..'s').toList.each
	it.echo
"".print

blocked_type_app_show.jmo

app.print.type.print

blocked_type_constlet_show.jmo

C = 4
:C.print.type.print

blocked_type_const_show.jmo

C = 5
(:C).print.type.print

blocked_type_funclet_show.jmo

x = :{5.add(3)}
x.print.type.print

blocked_type_function_show.jmo

::xyz
	func.print.type.print

this.xyz

blocked_type_loop_show.jmo

4.times
	it.print.type.print

blocked_type_varlet_show.jmo

c = 4
:c.print.type.print

blocked_type_var_show.jmo

v = 4
:v.print.type.print

block_calclet.jmo

7.while( each > 1 )
	l = [it]
	#it.echo
	it = it--
	l+=it
	it =--
	l+=it
	it ++= 2
	l+=it
	it --= 2
	l+=it
	it += 1
	l+=it
	
	l.implode(", ").print

block_exec_for.jmo

Count(3,7).each.toStr.begin("A: ").print

"---".print

Count(2,5)
	it.print
	(">  "+it).print
.toStr.begin("B: ").print

"------------------------------------".print

Count(2,5)
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

Count(2,5)
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

Count(3,6)
	("a:"+it).print
	Break
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-----".print

Count(3,5).each #(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

Count(3.2,5.9).each  #(11)
	it = 11
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

Count(1,3).each => x
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"---------".print

Count(9,7).each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"---------".print

Count(9.2,7.9,-0.6).each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"---------".print

3..7
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"---------".print

Count('b', 't', 5).each
	("a:"+it).print
	it=it*3
	("b:"+it).print
.toStr.begin("c:").print

"------------------------".print

(4..9).toList.print
Range(1.4, 9.2).toList.print
Count(1.4, 9.2, 1.3).toList.print

block_exec_list.jmo

[3,8,5,7,9,4].each.toStr.begin("A: ").print   #.do
[3,8,5,7,9,4].each.toStr.begin("B: ").print

"---".print

[3,8,5,7,9,4]
	it.print
	(">  "+it).print
.toStr.begin("B: ").print

"------------------------------------".print

[3,8,5,7,9,4]
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4]
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4]
	("a:"+it).print
	Break
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-----".print

[3,8,5,7,9,4].each  #.do(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4].each #.do(11)
	it = 11
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4].each => x   #.do(:x)
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"-----".print

[3,8,5,7,9,4].each   #(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4].each    #(11)
	it = 11
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

[3,8,5,7,9,4].each => x  #(:x)
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"---------".print

[3,8,5,7,9,4].each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"---------".print

Count(1, 9, 2).toList.print
Count(1.4, 9.2, 1.3).toList.print
Count(1.4, 9.2, 1.3).toList.each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

block_exec_repeat.jmo

b=true
Repeat(b).each.toStr.begin("1: ").tee(b=false).print
b=true
Repeat(b).each.toStr.begin("2: ").proc(b=false).print

"---".print

b=true
Repeat(b)
	it.print
	(">  "+it).print
	b=false
.toStr.begin("B: ").print

"------------------------------------".print

b=true
Repeat(b)
	b=false;
	("a:"+it).print
	it='2'
	("b:"+it).print
.toStr.begin("c:").print

b=true
Repeat(b)
	b=false
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

b=true
Repeat(b)
	b=false
	("a:"+it).print
	Break
	it=2
	("b:"+it).print
.toStr.begin("c:").print

"-----".print

b=true
Repeat(b).each #do(9)
	it = 9
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

b=true
Repeat(b).each #.do(11)
	it = 11
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

b=true
Repeat(b).each => x #.do(:x)
	b=false
	("a:"+it+" x:"+x).print
	it=2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"---------".print

b=true
Repeat(b).each
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

block_exec_times.jmo

5.times.toStr.begin("A: ").print

"---".print

5.times
	it.print
	(">  "+it).print
.toStr.begin("B: ").print

"------------------------------------".print

5.times
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

3.times
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

3.times
	("a:"+it).print
	Break
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-----".print

3.times #(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

3.times => x #(:x)
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"---------".print

5.timesDown
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"---------".print

1.times.print
3.times.print
3.timesDown.print

block_exec_varconst_autoblock.jmo

L = [3,8,5,7,9,4]

L.each.toStr.begin("A: ").print
L.each.toStr.begin("B: ").print

"---".print

L.each
	it.print
	(">  "+it).print
.toStr.begin("B: ").print

"------------------------------------".print

L.each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each
	("a:"+it).print
	Break
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-- A --".print

L.each #(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each  #(11)
	it = 11
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each => x #(:x)
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"-- B --".print

L.each #(9)
	it = 9
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each #(11)
	it = 11
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-".print

L.each => x #(:x)
	("a:"+it+" x:"+x).print
	it=it*2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"-- C -------".print

L.each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

"-- D -------".print

Count(1.4, 9.2, 1.3).toList.each
	("a:"+it).print
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

block_exec_while.jmo

b=true
While(b).each.toStr.begin("1: ").tee(b=false).print
b=true
While(b).each.toStr.begin("2: ").proc(b=false).print

"---".print

b=true
While(b)
	it.print
	(">  "+it).print
	b=false
.toStr.begin("B: ").print

"------------------------------------".print

b=true
While(b)
	b=false;
	("a:"+it).print
	it='2'
	("b:"+it).print
.toStr.begin("c:").print

b=true
While(b)
	b=false
	("a:"+it).print
	Next
	it=it*2
	("b:"+it).print
.toStr.begin("c:").print

b=true
While(b)
	b=false
	("a:"+it).print
	Break
	it=2
	("b:"+it).print
.toStr.begin("c:").print

"-----".print

b=true
While(b).each #(9)
	it = 9
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

b=true
While(b).each #(11)
	it = 11
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

b=true
While(b).each => x #(:x)
	b=false
	("a:"+it+" x:"+x).print
	it=2
	("b:"+it+" x:"+x).print
.toStr.begin("c:").print

"---------".print

b=true
While(b).each
	b=false
	("a:"+it).print
	it=2
	("b:"+it).print
.toStr.begin("c:").print

block_var_const_1.jmo

Loop \\ a
	Print a
	If( a > 3 )
		Print "abc"
		Break
	Print "def"
Print "xyz"

Print "---------------------"

Count(3) \\ b1?
	Print b1
	b1 = nil
	Print b1

Print "---------------------"

Object b2? = 0
Count(3) \\ b2?
	Print b2
	b2 = nil
	b2 = 'x'
	Print b2

Print "---------------------"

Object b3? = "foo"
Count(3) \\ b3
	Print b3
	b3 = 'y'
	Print b3
b3?.print

Print "---------------------"

['a', 'b', 'c'] \\ c
	Print c

Print "---------------------"

['a', 'b', 'c'].each => c
	Print c

Print "---------------------"

Each( ['d', 'e', 'f'] ) \\ d
	Print d

Print "---------------------"

Count(3) \\ E
	Print E

Print "---------------------"

4.times \\ f
	f.print

Print "---------------------"

4.times => f
	f.print

Print "---------------------"

"qwertz" \\ g
	Print g

Print "---------------------"

Loop \\ u1
	Print u1
	Break

Print "---------------------"

Loop \\ :u2
	Print u2
	Break

Print "---------------------"

Loop \\ :U3
	Print U3
	Break

Print "---------------------"

Loop => u4
	Print u4

block_var_const_2.jmo

Count(3) \\ a
	Print a

Print "---"

Count(3) \\ :B
	Print B

Print "---"

Count(3) \\ X
	Print X

Print "---"

Count(3).pass
	Print it

block_var_const_3.jmo

Count(3)\\:b
	Print b

Print "---"

Count(3).each.print

##############################################

block_var_const_4.jmo

Count(3) => C
	Print C

['a', 'b', 'c'].each => D
	Print D
	Break

Each( ['a', 'b', 'c'] ) => E
	Print E

block_var_const_5.jmo

Count(3) \\v
	Print v

Print '-'*20

Count( 6, 8 ) \\ a
	Count( 1, 3 ) \\ b
		Print "{} + {} = {2}".fill(a,b,a+b)

Print '-'*20

l = [ 0,2,5,9,3 ]
Each( l )\\ e
	If( e < 5 )
		Print e

block_var_const_6.jmo

# \\ is allowed like => without VarLet/ConstLet

>medium

Count(3) \\ a
	Print( a )

Count(3) \\ AA
	Print( AA )

10.mem( :b )
Print( b )

20.mem( :C )
Print( C )

30 => d
Print( d )

40 => E
Print( E )

block_var_const_7.jmo

l = [2,6,4,3]

Each(l) \\ e
	Print e + e
	Print it + it
	Print "---"

Print "----------"

l.each \\ f
	Print f + f
	Print it + it
	Print "---"

bool-logical-stop.jmo

::getTrue
	"getTrue  ".echo
	§= true
	
::getFalse
	"getFalse ".echo
	§= false

(°getFalse && °getFalse).print
(°getTrue  && °getFalse).print
(°getFalse && °getTrue).print
(°getTrue  && °getTrue).print
('-'*10).print

(°getFalse || °getFalse).print
(°getTrue  || °getFalse).print
(°getFalse || °getTrue).print
(°getTrue  || °getTrue).print
('-'*10).print

(°getFalse ^^ °getFalse).print
(°getTrue  ^^ °getFalse).print
(°getFalse ^^ °getTrue).print
(°getTrue  ^^ °getTrue).print
('-'*10).print

(°getFalse !&& °getFalse).print
(°getTrue  !&& °getFalse).print
(°getFalse !&& °getTrue).print
(°getTrue  !&& °getTrue).print
('-'*10).print

(°getFalse !|| °getFalse).print
(°getTrue  !|| °getFalse).print
(°getFalse !|| °getTrue).print
(°getTrue  !|| °getTrue).print
('-'*10).print

(°getFalse !^^ °getFalse).print
(°getTrue  !^^ °getFalse).print
(°getFalse !^^ °getTrue).print
(°getTrue  !^^ °getTrue).print

('-'*50).print

°getFalse.and(°getFalse).print
°getTrue.and(°getFalse).print
°getFalse.and(°getTrue).print
°getTrue.and(°getTrue).print
('-'*10).print

°getFalse.or(°getFalse).print
°getTrue.or(°getFalse).print
°getFalse.or(°getTrue).print
°getTrue.or(°getTrue).print
('-'*10).print

°getFalse.xor(°getFalse).print
°getTrue.xor(°getFalse).print
°getFalse.xor(°getTrue).print
°getTrue.xor(°getTrue).print
('-'*10).print

°getFalse.nand(°getFalse).print
°getTrue.nand(°getFalse).print
°getFalse.nand(°getTrue).print
°getTrue.nand(°getTrue).print
('-'*10).print

°getFalse.nor(°getFalse).print
°getTrue.nor(°getFalse).print
°getFalse.nor(°getTrue).print
°getTrue.nor(°getTrue).print
('-'*10).print

°getFalse.xnor(°getFalse).print
°getTrue.xnor(°getFalse).print
°getFalse.xnor(°getTrue).print
°getTrue.xnor(°getTrue).print

bool-logical.jmo

(false && false).print
(true  && false).print
(false && true).print
(true  && true).print
('-'*10).print

(false || false).print
(true  || false).print
(false || true).print
(true  || true).print
('-'*10).print

(false ^^ false).print
(true  ^^ false).print
(false ^^ true).print
(true  ^^ true).print
('-'*10).print

(false !&& false).print
(true  !&& false).print
(false !&& true).print
(true  !&& true).print
('-'*10).print

(false !|| false).print
(true  !|| false).print
(false !|| true).print
(true  !|| true).print
('-'*10).print

(false !^^ false).print
(true  !^^ false).print
(false !^^ true).print
(true  !^^ true).print
('-'*10).print

('-'*20).print

false.and(false).print
true.and(false).print
false.and(true).print
true.and(true).print
('-'*10).print

false.or(false).print
true.or(false).print
false.or(true).print
true.or(true).print
('-'*10).print

false.xor(false).print
true.xor(false).print
false.xor(true).print
true.xor(true).print
('-'*10).print

false.nand(false).print
true.nand(false).print
false.nand(true).print
true.nand(true).print
('-'*10).print

false.nor(false).print
true.nor(false).print
false.nor(true).print
true.nor(true).print
('-'*10).print

false.xnor(false).print
true.xnor(false).print
false.xnor(true).print
true.xnor(true).print
('-'*10).print

bool.jmo

true
false
true.print
false.print
(true).print

(true>false).print
(true<false).print
(true==false).print
(true!=false).print
(true<>false).print

true.toChar.print
true.toDec.print
true.toInt.print
true.toStr.print

bool_1.jmo

(92.mul(0.9).toBool && true.print).if.print

-432.toBool.print
0.toBool.print
1.toBool.print
432.toBool.print

bool_2.jmo

(0.toBool && true.print).print

Bool b = true
b.print
b=!
b.print
:b.notLet
b.print

bool_use.jmo

# Aktuell

°use(true, 1, 0).print

# Ideen

true.use(1, 0).print
false.use(1, 0).print

a = true
a.use('a', 5).print
a = false
a.use('a', 5).print
a.use('a', "bcde").print

bool_use_2.jmo

b = true
b.use( 'a'.print, 'b'.print ).print

"-----".print

b = false
b.use( 'a'.print, 'b'.print ).print

brackets_1.jmo

(3..1).print
[3..1].print
{3..1}.print	#TODO: Sollte {3,1,1} sein

(3..1).type.print
[3..1].type.print
{3..1}.type.print

Range(4,6).each.echo; "".print
List(4,5,6).each.echo; "".print			#<<<--- Flexible Arguments für List
Count(4,6,1).each.echo; "".print

(5>4)
	"Ja".print

[6..8]
	it.echo
"".print

{Range(6,8)}
	it.echo
"".print
{6..8}
	it.echo
"".print

(3..1).each.echo; "".print
[3..1].each.echo; "".print
{3..1}.echo; "".print

bracket_var.jmo

{2,5}.mem(:xYz_4 ).print( -2+xYz_4 )
{2,5}.mem( :xYz_4).print( -2+xYz_4 )
{2,5}.mem( :xYz_4 ).print( -2+xYz_4 )

"---".print

{2,5}.mem(:xYz_4).print( -2+xYz_4 )
{2,5}.mem(:xYz_4).print( -2+xYz_4 )
{2,5}.mem(:xYz_4) .print( -2+xYz_4 )

"---".print

Count(3).each.print
Count (3).each.print
Count (3) .each.print

"---".print

b = true
While( b ).each => xy #( :xy )
	b.print
	xy.print
	b = false

"---".print

(4==2).use('a', 'b') => qw
	qw.print
( 4==2 ).use('a', 'b').mem(:iu).print(iu+iu)

"---".print

(4+6+3).mem(:op).print(op*3)

# Somit auch möglich, macht es aber irgendwie unleserlich
# {3}.each()foo.print()cl.print(foo+cl)

bubblesort_insane.jmo

>insane

::bubble(List list)Nil
	:dirty.let(true)
	While(dirty).each
		:dirty.let(false)
		Count(1, list.length.sub(1)).each.mem(:pos).pass
			If(list.get(pos).isGreater(list.get(pos.add(1)))).then
				list.swap(pos, pos.add(1))
				:dirty.let(true)

:l.let(List(3,9,7,1,4,6,1,9,8,5,5,2))
l.print
this.bubble(l)
l.print

#####

l.each
	Group(Group(it.add(1)).get.mul(10)).get.print

bubblesort_open.jmo

>open

::bubble(list)
	dirty = true
	While(dirty)
		dirty = false
		{1, list.len - 1} => pos
			(list[pos] > list[pos + 1])
				list.swap(pos, pos + 1)
				dirty = true

l = [3,9,7,1,4,6,1,9,8,5,5,2]
l.print
°bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bubblesort_strict.jmo

>low

::bubble(List list)
	dirty = true
	While(dirty)
		dirty = false
		Count(1, list.len - 1).each => pos
			If(list[pos] > list[pos + 1])
				list.swap(pos, pos + 1)
				dirty = true

l = [3,9,7,1,4,6,1,9,8,5,5,2]
l.print
°bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bubblesort_style_classic.jmo

::bubble(List list)
	dirty = true
	#While(dirty)
	While(dirty)
		dirty = false
		Count(1, list.len - 1).each => pos
			If(list[pos] > list[pos + 1])
				list.swap(pos, pos + 1)
				dirty = true

l = [3,9,7,1,4,6,1,9,8,5,5,2]
l.print
°bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bubblesort_style_slim.jmo

::bubble(List list)
	dirty = true
	While(dirty)
		dirty = false
		{1, list.len - 1} => pos
			(list[pos] > list[pos + 1])
				list.swap(pos, pos + 1)
				dirty = true

l = [3,9,7,1,4,6,1,9,8,5,5,2]
l.print
°bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bubblesort_style_stream.jmo

::bubble(List list)
	dirty = true
	:dirty.while
		dirty = false
		(list.len - 1).times => pos		# (1..(list.len - 1)).each(:pos)
			(list[pos] > list[pos + 1]).if
				list.swap(pos, pos + 1)
				dirty = true

l = [3,9,7,1,4,6,1,9,8,5,5,2]
l.print
°bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bubblesort_verystrict.jmo

>high

::bubble(List list)Nil
	dirty = true
	While(dirty).each
		dirty = false
		Count(1, list.length - 1).each => pos #(:pos)
			If(list.get(pos) > list.get(pos + 1)).then
				list.swap(pos, pos + 1)
				dirty = true

l = List(3,9,7,1,4,6,1,9,8,5,5,2)
l.print
this.bubble(l)
l.print

#####

l.each
	((it+1) * 10).print

bugfix-listeachbreak.jmo

2.times
	"a".print
	(true)
		"b".print
		loop.next #&>>
		"c".print
	"d---".print

('='*10).print

2.times
	"a".print
	(true)
		"b".print
		loop.break #&||
		"c".print
	"d---".print

('='*10).print

2.times
	"a".print
	(true)
		"b".print
		#§<<
		app.exit
		"c".print
	"d---".print

"PRINT THIS".print

bugfix-map.jmo

2.times
	#daten = Map.add("name", "Max Muster")
	Map.add("name", "Max Muster").print

bugfix-returns.jmo

::test(l)
	('='*10).print

	2.times
		"a".print
		(true)
			"b".print
			(l==1)
				loop.next("x")
			(l==2)
				loop.break("y")
			(l==3)
				func = "z"
			"c".print
		"d---".print
	.print

°test(0).toStr.add('+').print
°test(1).toStr.add('+').print
°test(2).toStr.add('+').print
°test(3).toStr.add('+').print

"PRINT THIS".print

bugfix_2018-05-10.jmo

# Korrekt:
("23".split("2")).describe
('a'..'z').toList.set('-',4).each.echo; "".print

# Fehler!

['a'..'z'].type.print

a = Range('a', 'z').toList;
a.describe
a.set('*', 4)
a.describe

['a'..'z'].type.print
('a'..'z').toList.set('-', 4).describe
('a'..'z').toList.set('-', 4).each.echo; "".print

bugfix_2018-12-20.jmo

(69/25).abs.print

2*3.print
2.print*3
85*0.print
(85*2.print).print

(0.toBool && true.print).print
0.toBool && true.print

(3*(1/3)).print
(3*(1)).print

bugfix_2019-02-19_list_sort.jmo

[1,10,100,2,3,4].sort.print
# OK: [1,2,3,4,10,100]

[1,10,100,2,3,4,'5',"6",7,false].sort.print

bugfix_2019-04-29.jmo

4.print([5].print)

bugfix_2019-07-29_varname.jmo

line_es = []
line_es+="como"
line_es.print

bugfix_2019-08-03.jmo

result = []

3.times
	result.add( [it] )
	result.describe

bugfix_2019-08-05.jmo

CON="bla"
"hublafoo".contains(CON).print

bugfix_2019-08-11.jmo

a=2;b=5;(a+b*a).print

g=2
h=5
(g+h*g).print

j=2; (j+5*j).print
k=5; (2+k*2).print

('-'*10).print

l=2
(l+5*l).print
((l+5)*l).print
(l+(5*l)).print
(l.print+5.print*l.print).print

('-'*10).print

(2+5*2).print

c= 2+5*2
c.print

a.print
b.print

bugfix_2019-08-12.jmo

a=[(1..3).toList,Range(9,7).toList]
a.describe
a[2][2] = 4
a.describe

b=(2..6).toList
b.print
b[b[3]-2]=8
b.print

c=(4..9).toList
(c[1*2]==c[1+1+1]).print

bugfix_2019-08-13a.jmo

curType = "test"
line = " case xyz	"

curType.length.print

b = 5 > 0 
b.print

b = curType.length == 3 
b.print

b = curType.length < 3 
b.print

b = curType.length > 0 
b.print

b = curType.length.print > 0 
b.print

(curType.length.print > 0 && line.trim.startsWith("case "))
	"ok".print

((curType.length.print > 0) && line.trim.startsWith("case "))
	"okay".print

bugfix_2019-08-13b.jmo

type1 = "_Testinus"
type2 = "_Textinus"
blacklist = ["case","default","test","use"]

(type1.lower.contains("test"))
	"HAS".print

('-' * 30).print

m = ""
type1.lower.contains(blacklist.each.lower.mem(:m).print...).if
	"BREAK 1".print
	m.print

type2.lower.contains(blacklist.each.lower.mem(:m).print...).if
	"BREAK 2".print
	m.print

bugfix_2019-08-14a.jmo

3.times.toStr.pass
	(it.toInt != 1)
		"-----".print
	it.print
	a = it+"abc"
	a = a.replace('b', 'x')
	a.print
	(it.toInt == 3)
		#§ = a
		app = 0
	# it = ?( it.toInt == 2, a, it)
	it = (it.toInt == 2).use(a, it)
.print.right(2).print

bugfix_2019-08-31_this.jmo

this.print
°.print
°print

bugfix_2019-09-02.jmo

l = [].add( [4,8,2,5,7].each.passIf( cur < 5 )... )
l.print

bugfix_2019-09-30_condition.jmo

x=false
c=x.use(2,5)
c.print

x=true
a=3
b=6
c=x.use(a,b)
c.print

x=false
a=1
b=9
c.type.print
c.print

x=false
m=2
n=5
d=Use(x,m,n)
d.type.print
d.print
d.get.print

x=true
m=1
n=6
d.get.print

('-'*30).print

h=3
i=6
j=(h+i)
j.print
j.type.print
h=4
j.print

l=7
k=Group(l+5)
k.type.print
k.print
k.get.print
l=2
k.get.print

bugfix_2019-09-30_nr_type.jmo

0d.print
1s.print
2f.print
3i.print
4b.print
5l.print

0d.type.print
1s.type.print
2f.type.print
3i.type.print
4b.type.print
5l.type.print

bugfix_2019-10-02a.jmo



::MyTest(a,b)

	::get(c)

		§= a+b+c

### Test ###

MyTest(2,5).get(2).print
MyTest(3,6).get(2).print

a=MyTest(1,3)
b=MyTest(5,8)
(a.get(2)+b.get(2)).print

bugfix_2019-10-02b.jmo


a=9

::sort(List list) List

	a.print

	( list.len <= 1 )
		§= list

	"---".print
	list.print

	list[1] = list[1]+1
	list.print

	l2 = °sort(list.start(2))
	l2.insert(list[1], 1)
	§= l2

l = [0,0,0,0,0]
l.print

l = °sort(l)
l.print

bugfix_2019-10-02c.jmo

::MyTest(a,b)
	::get(c)
	#	'a'.pass
	#	[9].each
		§= a+b+c

::Foo(a,b) ^ MyTest(a,b)
	2.times
		super.get(1000).print
		this.get(2000).print
	::doThis
		2.times
			super.get(3000).print
			this.get(4000).print

### Test ###

Foo(11,12).get(13).print
Print "-----"

Foo(21,22).get(23).print
Print "-----"

a=Foo(31,32)
b=Foo(33,34)
(a.get(35)+b.get(36)).print

Print "-----"

a.doThis

bugfix_2019-10-07.jmo

3.add(3.times...).print
('-'*10).print
a=2;b=5;(a+b*a).print
('-'*10).print
(2+5*2).print
('-'*10).print
(2.print+5.print*2.print).print
('-'*10).print
(2+5.print*2).print

bugfix_2019-10-08_constructor.jmo

::Bla
	state=1	

	::init(i)
		state=i
	::add(arg)
		state+=arg
	::show
		state.print

test=Bla
test.init(5)
test.add(4)
test.show

####################################

::Foo(s)
	state=s
	::add(arg)
		state+=arg
		§=°
	::show
		state.print

test2=Foo(5).add(4)
test2.show

####################################

::Bar(state)
	::add(arg)
		state+=arg
		§=this
	::show
		state.print

test3=Bar(5).add(4)
test3.show

bugfix_2019-10-11_nil.jmo

a? = nil

(a? != nil)
	1.print
.else
	11.print
	
(a? == nil)
	2.print
.else
	12.print
	
(a?.isNil)
	3.print
.else
	13.print

(a?.isNil!)
	4.print
.else
	14.print

bugfix_2019-10-17_link_autoblock.jmo

a=true;
While(a.print)
	it.print; a=false

"---".print

1.echo;2.echo;3.print

"---".print

# Hier will JMo in der ersten Zeile mit Char/Bool einen AutoBlock starten

b='a'; While(b.print == 'a')
	it.print; b='b'
	
"---".print

c=true; While(c.print)
	it.print; c=false

bugfix_2019-10-21_continue.jmo

dy = 100
yplus = 5
zwei = false

{0.0,dy,yplus}
	y = it
	it.toStr.begin("a").print
	((y > yplus*4) && (y < dy-yplus*4))
		"b".print
		Next
	"c".print

bugfix_2019-10-21_if_or.jmo

3.print			# 3
"foo".print		# foo
3.echo.print	# 33
2+3*4.print		# 4

2+3*4
2+3*2.print		# 2
(2+3*4).print	# 14
(2+3*4.print+5*6).print		# 4 44

a = 2+3*4/2-1
a.print		# 7.0

{3}
	'a'.print	# a a a

(2 <= 2*2 || false).print	# true

(2 <= 2*2 || false)
	"yes".print		# yes

(2 <= 2*2 || 2 >= 10-2*2)
	"yuhuu!".print	# yuhuu!

(5 & 2).print	# 0
(5 | 2).print	# 7
(5 ^ 2).print	# 7
'-'.print
(true && true).print
(true || true).print
(true ^^ true).print
'-'.print
(true !&& true).print
(true !|| true).print
(true !^^ true).print
'-'.print
(true! !&& true).print
(true! !|| true).print
(true! !^^ true).print
'-'.print
(true!&& true).print
(true!!&& true).print
"------------------".print

# A_Number
# Bool

# Wichtiger Test!
"Important: ".echo
( 3 & 1 < 2 | 5|3 > 6 ).print

"-----".print

::mtest(m)
	(m.len > 0 && m[3]=='A')
		m = m.start(2).trim
	m.len.print

°mtest("")		# 0
°mtest("abc")	# 3
°mtest("CBA")	# 2

"-----".print

y = 2
yplus = 2
dy = 10

(y <= (yplus*2) || y >= (dy-yplus*2))
	51.print		# 51

(2 <= 2*2 || y >= 10-2*2)
	52.print		# 52

bugfix_2019-10-21_if_or2.jmo

y = 2
yplus = 2
dy = 10

(y <= (yplus*2) || y >= (dy-yplus*2))
	51.print		# 51

(2 <= 2*2 || y >= 10-2*2)
	52.print		# 52
	

(y == 2)
	53.print
	
(4 == 2+2)
	54.print

y.print	
(y == 2+2)		# FEHLER! Warum?!?
	55.print
	

(y <= 2*2 || false).print
	
	
	

(y <= yplus*2 || y >= dy-yplus*2)
	56.print

bugfix_2019-10-21_loop.jmo

l = [].add( 5.times... )
l.print

l = [].add( 0.times... )
l.print

3.print(0.times...)

5.print(3.times...)		#123

5.print(3.times.times...)	#1 12 123

::test1(Int a, Int b)
	"---".print
	a.print
	b.print

°test1(2.times..., 2.times...)

::test2(Int a, Int b)
	"{}+{}={}".fill(a,b,(a+b)).print

°test2(2.times..., 2.times...)

bugfix_2019-10-22_init.jmo

::test(v)
	("--- "+v+" ---").print
	v.print.type.print
	v.toStr.print.type.print
	('-'*10).print

°test(true)
°test(false)
°test(2)

bugfix_2019-10-22_loopstream.jmo

5.print(3.times...)

5.print(cur.times...)

bugfix_2019-10-23_for.jmo

Count(3, "9".toInt).print
"---".print
Count(3, "9".toInt).each.print
"---".print
Count(3, "9".toInt).pass.print
"---".print
Count(3, "9".toInt).each.print

bugfix_2019-11-05_multicall.jmo

list = ["case","default","test","use"]

"mytestcase".contains(list.each.print...).print("---").print(cur.toStr.begin("> ")).if
	"TRUE".print

bugfix_2019-11-07_block_result_var.jmo

Try
	x2 = 1.try.print.lkj.print
	x3 = x2
	it = x3
.detail.print

Try
	x2 = 2.print.lkj.print
	x3 = x2
	it = x3
.detail.print

3.try.print.lkj.print

x4 = 4.try.print.lkj.print
x4.detail.print

### Bricht korrekt mit Fehler ab

bugfix_2019-11-07_const.jmo

DateTime(2020,9,29,10,21,8).print

TIME = DateTime(2019,8,28,9,20,7).style("YYYYMMDD_hhmmss")
TIMES = "20191107_145000"

TIME.print
TIMES.print

bugfix_2019-11-07_indent.jmo

::line(s)
	"=== {} ===".fill(s).print

°line("foo")
1.print.print

°line("bar")
2.print.print

bugfix_2019-11-18_and_abort.jmo

m3=""

Try
	(m3.len > 0 && m3[1] == '%')
		m3 = m3.from(2)
.catch
	it.message.print
	it.detail.print

m3.begin(":>").print.len.print

bugfix_2019-11-21_incdecpow.jmo

(5++**--).print
5++**--.print

a=3
a++**--
a.print

b=4
(b++**--).print
b.print

c=6
(c++**.inc).print
c.print

bugfix_2019-11-21_incround.jmo

1.1++.round.print
(1.1++.round).print

a = 2.1
a++.round.print
a.print

b= 3.1
(b++.round).print
b.print

b= 4.1
(b++.inc).print
b.print

b= 5.1
(b.toStr.begin("10")).print
b.print

b= 6.1
(b++.toStr.begin("10")).print
b.print

c= 7.2
(c++**--).print
c.print

bugfix_2019-11-24_nonatomic_create.jmo

Try
	If
.catch.detail.print

Try
	If(Random)
.catch.detail.print

bugfix_2019-12-02_list.jmo

[]
	'a'.print
.print.print('b')

bugfix_2019-12-02_table.jmo

t1=Table(2).add(4,9).add(1,7)
t1.print

t2=Table(2).add(2,8).add(3,6).print
t2.print

t2.each
	it.echo(it.type).print
t2.each.each
	it.print

t2.print

t2.get(2).print.each
	it.echo(it.type).print

(10*'-').print

t=Table(2)
t.add(3,5).add(9,6).add(0,3).add(6,7).add(3,2).add(3,3)
t.print
"--".print

t.search(3).print
"---".print

t.search(3).each
	it.print
"--".print	

t.searchFirst(6).print
t.searchFirst(6).each
	it.print

"-".print

t.length.print
t.len.print
t.length.print
t.width.print

bugfix_2019-12-14_cmd.jmo

´echo -n 2; echo -n 3; echo 4; echo -n 5; echo 6´
"---".print
´echo 7´
´echo -n 8´
´echo 9´
"foo".print

bugfix_2019-12-14_group-if.jmo

(true).print

# .do wird für Bool ausgeführt. 
# Ist mittlerweile ok, warf frueher einen Fehler
x = (true).try.if.print
x.print

(true).pass.print

(true)
	'a'.print
.print

bugfix_2019-12-14_proc.jmo

Try
	b = "uvw".pass
		it = it.add("xyz").print
	.print

	b.print
	
.catch
	it.show

#########################################

Try
	b = "uvw".proc("rst".print).pass
		it = it.add("xyz").print
	.print

	b.print
	
.catch
	it.show

#########################################
Try
	b = "uvw".proc.pass
		it = it.add("xyz").print
	.print

	b.print
	
.catch.message.print

bugfix_2019-12-14_proc2.jmo

b = 1.print.print

.print

b.print

#################

2

.print

3
###
.print

bugfix_2019-12-14_proc3.jmo

b = 8.echo.abs.times
	5.echo
.print

b.print

"#######################".print

2
	it.print
.print

"#######################".print

3.abs.times
	99.print
.print

bugfix_2019-12-15_range_stream.jmo

(2..8.print).print

2..8
	it.print

2..8.type.print
(2..8).type.print
(2..8).print.each
	it.print

Try
	2..3+1
		it.print
.catch.info.print

2..8.pass
	it.print
(2..8).pass.type.print
(2..8).pass
	it.print

bugfix_2019-12-19_continue.jmo

5.times.print("").print.each
	'a'.echo
	loop.next
	'b'.print

"".print
('-'*30).print

5.times.print.pass
	'a'.print

('-'*30).print

5.times.print.pass
	'a'.print
	loop.next
	'b'.print

('-'*30).print

# Runs .times.times!
5.times.print.each
	'a'.print

('='*30).print

[3,9,4].each.print.each
	'-'.print
	it.print

('-'*10).print

::test(list)
	list.each.print.each
		it.print
	
	
°test([2,6,7])

bugfix_2019-12-26_unknowntype.jmo

# Typ "Unknown" wird akzeptiert und zugewiesen!

::WrongType(Unknown who="Welt")
	::hallo
		"Hallo ".add(who).print

Try
	WrongType.hallo.print
.catch.detail.print

bugfix_2020-01-05_it_to_its.jmo

5.pass
	it.print(cur)

3.pass
	it.print(cur+") ")

bugfix_2020-01-09_lineNr.jmo

1.proc(cur+2).print
3.tee(cur+4.print).print

b=[]; [5..9].unfold.each.mem(:a).proc(b.add(a*2)); b.print

Try
	x=[]; [5..9].each.mem(:y).proc(x.add(y*2)); x.print
.catch
	it.source.print	# Line-Nr. is correct!

1.proc(cur+2).pass
	it = it+3
.print

#####

3.proc(cur+4.print).pass
	it = it+5.print
.print

3.tee(cur+4.print).pass
	it+5.print
.print

bugfix_2020-01-09_multicall.jmo

d = 'a'.add(('b'..'z').each...)
d.print

e = 'a'.add( {'b', 'z'}... )
e.print

f = 'a'.add( 'z' )
f.print

g = 'a'.add( 5.times... )
g.print

h = 'a'.add( 3.times.print... )
h.print

x = "b"
i = x.add( 3.times.print... )
i.print

x2 = "c"
i2 = x2.add( {'d', 'z'}... )
i2.print

y = []
j = y.add( 3.times.print... )
j.print

k = [].add( 3.times.print... )
k.print

bugfix_2020-01-09_range_in_list.jmo

h = Range(2,-2)

h.toList.print

[h].print

[1,2,3,4..9,10].print
[1,2,3,4..9,10].unfold.print

[1,Range(2,4),5..9,10].print
[1,Range(2,4),5..9,10].unfold.print
[1,Range(2,4),5..9,10,"abc",[0,1,2]].unfold.print

bugfix_2020-01-11_function_partype.jmo

::func( Str s )
	s.print

°func("Jo!").print

bugfix_2020-01-13_open_textblock.jmo

""""
Dies ist Text
sdf"""".print

bugfix_2020-01-17_combine.jmo

5.echo#.foo
.print

bugfix_2020-01-18_blockcomment.jmo

1.print
4.print
5.print

bugfix_2020-01-18_combine2.jmo

::test
	daten=Map
	.add("adresse1", 1)
	.add("adresse2", 2)
	.add("adresse3", 3)
	.add("rechnung", 4)

	daten.print

°test

bugfix_2020-01-25_Stream-Objekt_im_Block.jmo

5.pass
	cur.print
	it.print

Print "-----"

5.times
	cur.print
	it.print

bugfix_2020-01-26_typedef.jmo

::MyType()
	::foo
		"Foo".print

MyType.foo

bugfix_2020-01-31_events.jmo

v = 3
:v::@varChanged
	"Changed to ".append(it).print

"---".print

Try
	:v::@changed
		"Unknown event 1".print
.catch.detail.print

Try
	v::@gwerht
		"Unknown event 2".print
.catch.detail.print

"---".print

v=9
v.print

bugfix_2020-02-13_combine.jmo

l = [3,4,8,
	2,3,4,
	9,0,1]

l.print

bugfix_2020-02-17_comment.jmo

3.times
	If(it == 2)		# https://
		Next

	sp = it.add(3)

	sp.print

bugfix_2020-02-21_cmd_textblock.jmo

text = """"Dies ist ein ...
langer,
sehr langer,
sehr sehr langer
Text"""".print

text.upper.print

´echo '""""'´
´(""""echo 5"""")´

bugfix_2020-03-24_filelist.jmo

"123".print

"-----".print

Dir("/home/mike/Prog/JayMo/tests_local/testdir").files("*.txt").print.each.print

"-----".print

Dir("/home/mike/Prog/JayMo/tests_local/testdir/").files("*.txt").each.name.print

bugfix_2020-03-24_multicall.jmo

::Foo
	f = "a"
	::add(a)
		f += a
		§=°
	::get
		§=f

l = Foo.add( 3.times.print... )
l.get.print

m = Foo
l = m.add( 3.times.print... )
l.get.print

bugfix_2020-03-24_scriptbreak.jmo

1.print

2.print

3.print

Dir("/home/mike/Prog/JayMo/tests_local/testdir/").list.each.absolutePath.print
#

bugfix_2020-03-25_comment.jmo

1.print

/*3.print
4.print;

bugfix_2020-03-27_Str_toPos.jmo

s = "foo".print

Try
	s.end(0)
.catch.detail.print

s.end(1).print
s.end(2).print
s.end(3).print
s.end(4).print
"---".print
s.end(-1).print
s.end(-2).print
s.end(-3).print
s.end(-4).print

"-----".print

Try
	s.start(0)
.catch.detail.print

s.start(1).print
s.start(2).print
s.start(3).print
s.start(4).print
"---".print
s.start(-1).print
s.start(-2).print
s.start(-3).print
s.start(-4).print

bugfix_2020-03-29_event_call.jmo

::@myEvent

°::@myEvent
	"abc".print

Try
	b.@myEvent
		"foo".print
.catch.message.print

Try
	b@myEvent
		"foo".print
.catch.message.print

bugfix_2020-04-05_var_double.jmo

>lazyErrors
######################################

::Foo
	a = 0
	
	::setValue1(a)	# Breaks
		"f1".print
		a.print
		a = 3
		a.print
	
	::setValue2(a)!!
		"f2".print
		func.init	# Breaks
		a.print
		a = 3
		a.print
	
	::show
		a.print

######################################

f = Foo

f.show

Try
	f.setValue1(2)
.catch.info.print

f.show
"-----".print

Try
	f.setValue2(9)
.catch.info.print

f.show

bugfix_2020-04-10_args.jmo

Try
	app.args[1]=5
.catch.detail.print

bugfix_2020-04-16_function_def.jmo

:: test( Char c = 'a' ) Str = (   c   *   5   ) .print

°test( 'b' ).print
"---".print
°test( ).print
"---".print
°test.print

bugfix_2020-04-18_func_vars.jmo

::testA(a = 'a')
	a.print

::testB(b? = 'b')
	b?.print

::testC(Object c? = 'c')
	c?.print

::testD(Object d? = 'd')
	d?.print

::testE(E = 'e')
	E.print

::testF(F? = 'f')
	F?.print

#####

°testA
°testA(1)
Try
	°testA(nil)
.catch.message.print
°testB
°testB(2)
°testB(nil)
°testC
°testC(3)
°testC(nil)
°testD
°testD(4)
°testD(nil)
°testE
°testE(5)
Try
	°testE(nil)
.catch.message.print
°testF
°testF(6)
°testF(nil)

"---".print

K? = nil
K?.print

bugfix_2020-04-21_group_return.jmo

( 5 == 3+2 ).toStr.begin("1: ").print

( 5 == 3+2 )
	it.toStr.begin("2: ").print
	"It's true".print
.else
	it.toStr.begin("3: ").print
	"It's not true".print

bugfix_2020-04-21_missing_comment_start.jmo



"Okay".print

bugfix_2020-04-23a.jmo

# a=4+6*2;b=a>3*2+1;c=a+1 > 1 ^ false ;a.print;b.print;c.print

a = 16

b = 16 > 3 * 2 + 1
b.print
b = a > 3 * 2 + 1
b.print

bugfix_2020-04-24_prio.jmo

If( 5 == 3+2 ).then
	"It's true".print		# "It's true"
.else
	"It's not true".print

"---".print

(Time(11,22,33).minutes.toStr.right(1).print.toInt != 0).print	# 2 true

"---".print

time = Time(10,24,35)
time.print	# 10:24:35

If(time.minutes.toStr.right(1).toInt != 0).then
	#time-=60
	"foo".print		# "foo"
	
time.print  # 10:24:35

"---".print

(false && true && false ^^ (true || true)).print	# false

(4+3*2-1 < 4 && 5==5 && true.not ^^ (true || 4+4==8)).print		# false

2+5*11-17 < 23 && true

((2+ (5*11*17)) < 23) && true

1+2*3*4+3 < 5 && true
(1+2*3*4 < 5 && true).print		# false

bugfix_2020-04-25_multicall.jmo

::test(Bool a)
	a.print(2.times...).if
		"foo".print

°test(true)
"---".print
°test(false)

bugfix_2020-04-26_isnil.jmo

("13" != nil).print
(5 != nil).print
(5 == nil).print

"---".print

("5" != 5).print
("5" == 5).print
("5".toInt == 5).print
(5 != 5).print
(5 == 5).print

"---".print

5.isNil.print
5.isNil!.print

nil.isNil.print
nil.isNil!.print

"---".print

(nil == 5).print
(nil != 5).print
(nil == nil).print
(nil != nil).print

bugfix_2020-04-26_list_sort.jmo



['a','c','A',"a","c",2,"A","b","C","B",'b','C','B',5].describe.sort.describe

l="Readability".split('a')
l.describe
l.add('r')
l.describe
l.sort.describe

bugfix_2020-04-26_list_sub.jmo

(['a','b','c','d'].reverse.print.sort.print-'b'+'a'+'x').print.reverse.print.uniq.print
"---".print
(['a','b','c','d'].reverse.print.sort.print--['c']+'a'+'x').print.reverse.print.uniq.print

bugfix_2020-04-26_multicall_prio.jmo

# Hmmm
[].add([5..9].unfold.each*2...).print

# Okay
[].add([5..9].unfold.each.mul(2)...).print

# Test
[].add(a= [5..9].unfold.each*2...).print
a.print

bugfix_2020-05-13_comment.jmo

24++//**).print

bugfix_2020-05-15_function_par_abstract.jmo

::test1(Object o)
	o.print.type.print
	
::test2(Object o)
	o.print.type.print
	
::test3(IntNumber i)
	i.print.type.print

::test4(IntNumber i)
	i.print.type.print

°test1('a')
°test1("abc")
°test1(5)
°test1(this)

"---".print

°test2('a')
°test2("abc")
°test2(5)
°test2(this)

"---".print

°test3(4)
°test3(5s)
°test3(2b)
Try
	°test3('a')
.catch.detail.print

"---".print

°test4(4)
°test4(5s)
°test4(2b)
Try
	°test4('a')
.catch.detail.print

bugfix_2020-05-15_function_result.jmo

::test1(Number n) IntNumber
	§ = n
	
::test2(IntNumber i) Object
	§ = i

::test3(Object i) Chars
	§ = i

°test1(5).print
°test1(3b).print
Try
	°test1(5.6).print
.catch.detail.print

"---".print

°test2(4).print
°test2(5s).print
°test2(2b).print

"---".print

°test3('h').print
°test3("lkj").print
Try
	°test3(5).print
.catch.detail.print

bugfix_2020-05-15_root.jmo

this.print

"-----".print

::test(Root r) Root
	"test".print
	r.showMe
	§ = r.print
	
::showMe
	"Show me!".print
	
°test(this).test(this).showMe

"-----".print

::MyType(Root s)
	
	::test2(Root r)Root
		"test2".print
		°test3(°).print
		°test3(this).print
		r.showMe
		§=r.print
	
	::test3(MyType r) MyType
		"test3".print
		§=r.print
	
	::show
		"Okay!".print
	
	("New MyType("+s+")").print
	#s.print
	s.showMe

MyType(this)
"-".print
MyType(this).test2(this).print

"-".print
MyType(this).test3( MyType(this) ).print

bugfix_2020-05-16_compareto.jmo

someabstract = ["Object","Atomic","Number","IntNumber","DecNumber","Chars","DateTimeBase","FileSys","Sequence"]

someabstract.contains("Object").print
someabstract.contains("Object_").print
someabstract.contains("TestObj").print
someabstract.contains("Chars").print
someabstract.contains("chars").print

bugfix_2020-05-16_property_error.jmo

Try
	("abc".lower = "def".lower).print		# Clear error
.catch
	it.message.print
	it.detail.print

"-----".print

Try
	("abc".lower == "def".lower).print
.catch.detail.print

bugfix_2020-05-20_datetime_format.jmo

d = Date(2020,5,9)
d.style("DMY~").print
d.style("DM~Y").print
d.style("D~MY").print
d.style("~DMY").print
d.style("DMY").print

bugfix_2020-05-20_multiline_addsub.jmo

# Zeilen mit + und - nicht verbinden

a = 1
-2

b = 3
+4

a.print
b.print

bugfix_2020-05-23_list_concat.jmo

l = [1,2,3] ++ [4,5,6]
l.print

bugfix_2020-05-24_varChanged2.jmo

::@changed

°@changed

this::@changed
	"Foo".print

°@changed

####################

::@cha_nged2

°@cha_nged2

this::@cha_nged2
	"Bar".print

°@cha_nged2

bugfix_2020-05-30.jmo

# Bug: /-
(5/-1).print

# Tests:
(4/2-1).print

(5*+1).print
(5|+1).print
(5>+1).print
(5<-1).print

(5++1).print
(5--1).print

bugfix_2020-06-08_compare_int_dec.jmo

l1 = [2.9, 3, 3.5]
l2 = [2.9, 3.0, 3.5, 3.9, 4.1]

::test(a, b)
	("--> "+a+" | "+b).print
	(a >  b).if.print("> ")
	(a >= b).if.print(">=")
	(a == b).if.print("==")
	(a <= b).if.print("<=")
	(a <  b).if.print("< ")
	(a != b).if.print("!=")
	

this.test(l1.each ..., l2.each ...)
"---------------".print
this.test(l1.each ..., l2.each.toByte ...)
"---------------".print
this.test(l1.each ..., l2.each.toLong ...)

bugfix_2020-07-01_regex_comment.jmo

url = "http://algundwebcam.com/bild.jpg"
file = url.replace(RegEx(".*/"l), "")
file.print

6"""".print
""""/*7"""".print

bugfix_2020-07-03_vartype.jmo

::Xyz
::Uvw

a = Xyz
a.print

Try
	a = Uvw
	a.print
.catch.detail.print
a.print

bugfix_2020-07-14_comparsion.jmo

l = [ true, 1b, 1s, 1i, 1l, 1c, 1f, 1d, '1', "1" ]

len = l.len
t = Table( len, len, nil )
{2} => test
	{ len } => y
		{ len } => x
			Object result? = nil
			Try
				( test == 1 )
					result? = l[x].isLessOrEqual( l[y] )
				( test == 2 )
					result? = l[x].isGreaterOrEqual( l[y] )
			.catch
				result? = it.detail.afterFirst("expected").trim(' ', ':')
			t.set( result?, y, x )

	t.print
	"".print

'1'.isLessOrEqual( "1" ).print

bugfix_2020-07-14_str_equals.jmo

l = [ "7.98", "5.44", "1.23", 7.98, 5.44, 1.23 ]

len = l.len
t = Table( len, len, nil )
{4}=>test
	{ len }=>y
		{ len }=>x
			Object result? = nil
			Try
				( test == 1 )
					result? = l[x].isLessOrEqual( l[y] )
				( test == 2 )
					result? = l[x].isGreaterOrEqual( l[y] )
				( test == 3 )
					result? = l[x].isEqual( l[y] )
				( test == 4 )
					result? = l[x].compares( l[y] )
			.catch
				result? = it.detail.afterFirst("expected").trim(' ', ':')
			t.set( result?, y, x )

	t.print
	"".print

bugfix_2020-07-16_times_pass.jmo

3.times
	it.echo
"".print

3.times.pass
	it.echo
"".print

a = 3.times
a.print

a = 3.times
	it.echo
a.print(cur+5)

"-----".print

3.times
	it = it+100
.print

"-----".print

a = 10
a = 3.times
	it = it+100
	it.print
a.print

"-".print

a = 10
a += 3.times		
	it = it+100
	it.print
a.print

"-".print

3.times
	it.print

b= 10
b += 3.times
	it.print
b.print

"---------------------------".print

c = 10; c += 3; c.print
c = 10; c -= 3; c.print
c = 10; c *= 3; c.print
c = 10; c /= 3; c.print
"-".print
c = 10; c %= 3; c.print
c = 10; c &= 3; c.print
c = 10; c ^= 3; c.print
c = 10; c |= 3; c.print
"-".print
c = 10; c ++= 3; c.print
c = 10; c --= 3; c.print
c = 10; c **= 3; c.print
c = 10; c //= 3; c.print
"-".print
d = true; d &&= false; d.print
d = true; d ^^= false; d.print
d = true; d ||= false; d.print

bugfix_2020-07-16_var_abf.jmo

"abc"
	it.print

"-----".print

Try
	x = "abc"
	x
		it.print
.catch.detail.print

bugfix_2020-07-19_var_modifier.jmo

Try
	a? = 4
	a = 2
	a.print
.catch
	it.message.print
	it.detail.print

bugfix_2020-08-19_atomic_add.jmo

( 3+',' ).print
( ','+3 ).print

# Ist:  '/'
# Soll: "3,"

bugfix_2020-09-17_cur_cur.jmo

5.print( cur.print() )
"---".print
5.print( cur.print(cur) )
"---".print
5.print( cur.print( cur+'a') )

bugfix_2020-09-19_equals.jmo

("Z" == "Z").print
("Z" == 'Z').print
('Z' == 'Z').print
('Z' == "Z").print

"-----".print

("4" == "4").print
("4" == '4').print
("4" ==  4 ).print
('4' == "4").print
('4' == '4').print
('4' ==  4 ).print
( 4  == "4").print
( 4  == '4').print
( 4  ==  4 ).print

bugfix_2020-09-28_vce.jmo

(2 => xy).print
xy.print

{4} => xy
xy.print

({6} => xy).print(xy+5)

# Access to uninitialized variable

({8} => uv) #.print(uv+5)
uv.print

bugfix_2020-09-29_type_vars.jmo

>lazyErrors

a = 0
b = 1

::Test(a)
	a.print
	Try
		b.print
	.catch.info.print

Test(4)
Test(9)

bugfix_2020-10-01_java.jmo

["Byte","Short","Integer","Long","Float","Double"].each.proc(:x, Java(x).MIN_VALUE.tee(cur.len.mem(:l)) + ((20-l)*' ') +" | "+ Java(x).MAX_VALUE).print

bugfix_2020-10-17_overwrite_toStr.jmo

::Foo
	a = 5
	
	::toStr = "Foo("+a+")"
	

	
	::foo = 2+a*3
	
	::bar = "Bar("+a+")"
	
	::bak
		§ = a
	
Foo.bak.print
Foo.foo.print
Foo.bar.print
Foo.toStr.print
Foo.print

bugfix_2020-10-18_par_shortcuts.jmo

# Okay
"abcdefg".reduce( 0, :x, x[1] + x[2].ord ).print
"abcdefg".reduce( 0, each.mem(:y).proc( y[1] + y[2].ord) ).print
"abcdefg".reduce( 0, each.tee(cur[1].mem(:z))[2].ord+z ).print

# Error
Try
	"abcdefg".reduce( 0, each[1] + each[2].ord ).print
.catch.info.print

bugfix_2020-10-19_vars.jmo

>lazyErrors

::Foo()
	::bar()!!
		x = 'a'
		func.push('b')
		"---".print
		func.push(x)

::Bak()!!
	::bar()!!
		x = 'c'
		func.push('d')
		"---".print
		func.push(x)

######################################

c = 'e'

Foo.pass
	it.print
	Try
		c.print
	.catch.info.print

"----------".print

Foo.bar
	it.print
	Try
		x.print
	.catch.info.print
	Try
		c.print
	.catch.info.print

"----------".print

Bak.bar
	it.print
	Try
		x.print
	.catch.info.print
	Try
		c.print
	.catch.info.print

bugfix_2020-10-22_ls.jmo

['e','a','z','.']
	´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lower.table(it).sort.print.print("----------")

"================".print

["bin","copying.gpl","jar","src","test"].map( each.lower.left(3) ).print.sort( :s, s[1] > s[2]).print

"================".print

´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lower.lines.each.left(3).print

"================".print

´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lower.lines.map( each.left(3) ).sort.reverse.uniq.implode(' ').print

"================".print

a=5
b=:a
b[].print

bugfix_2020-10-24_stack_overflow_2.jmo

::Foo( Bool test )!!
	counter = 0

	::foo
		Print counter=++
		this._init
		If( test )
			°foo
		§ = test

#####################################

MAX = 5
c = 0

:: again
	c=++
	Return c < MAX

Foo( this.again ).foo.print

bugfix_2020-10-26_textblock.jmo

text = """"foo"foo"bla"te"me"do"re""""
text.print

"-----".print

tree = >>>>html
	font-size: "16px"
	test:"<><><><>"
body
	padding: "20px"<<<<.print
tree.print

"-----".print

tree = >>>>html
	font-size: 16px
	test:<><><><>
body
	padding: 20px<<<<?.print
tree.print

bugfix_2020-10-26_tree.jmo

# Komma am Ende, kombinieren!

tree = >>>>
html
	font-size: "16px"
body
	padding: "20px"
b,
strong
	font-weight:"bold"
<<<<

tree.print

bugfix_2020-11-10.jmo

# Im namespace "Swing" wird "HSqlDB" nicht mehr gefunden!
# Auch nicht mit "Std_HSqlDB"

>prefix("Swing")

al = Java("ArrayList")
al.toString.print

al = Java_ArrayList
al.toString.print

db = HSqlDB
db.print
db = HSqlDB
db.print

c = Count(3)
c.print
c = Count(3)
c.print

b = _Button
b.print
b = Swing_Button
b.print

bugfix_2020-11-16_debug.jmo

5.debug

bugfix_2020-11-17_magicvars.jmo

# Literale/MagicVars dürfen ähnliche Variablen/Konstanten nicht blockieren

niled = 1
niled.print

# Ebenso für true/false, TRUE/FALSE, True/False, nil, cur,each,func,it,loop,this, ...

it2 = 2
it2.print

trues = 3
trues.print

falsed = 4
falsed.print

fal = 5
fal.print

false.print

nili = 6
nili.print

looped =7
looped.print

thisi = 8
thisi.print

curi = 9
curi.print

funcy = 10
funcy.print

eachi = 11
eachi.print

ap = 12
ap.print

appp = 13
appp.print

jm = 14
jm.print

jmoy = 15
jmoy.print

bugfix_2020-11-30_cur.jmo

>lazyErrors

::test1(b=cur)
	b.print

this.test1
this.test1('c')
this.test1(cur)

"----------".print

::test2(b=cur)
	b.print

this.test2
this.test2('c')
this.test2(cur)

"----------".print

::test3(b=°)
	b.print

this.test3
this.test3('c')
this.test3(cur)

"----------".print

::myUse(Bool b=cur, o1, o2) = o1+o2

°myUse(true,1,2).print
Try
	°myUse(1,2).print
.catch.info.print

bugfix_2020-12-04_it1.jmo

it? = 54

it.print
it?.print

bugfix_2020-12-04_it3.jmo

it? = 12
it?.print

it? = 34
it?.print

it = 56
it.print

bugfix_2020-12-11_treeblock.jmo

>>>>
html,   
body, 
hr  ,  p a,  
p, 
a
	font-size:16px
<<<<?.print

>>>>
html,   
body, 
hr  ,  p a,  
p, 
a
	font-size:"16px"
<<<<.print

bugfix_2020-12-18_str_fill.jmo

s = "{} - {} - {}"
s.fill( 1, 2, 3, 4).print
s.fill( 1, 2, 3).print
s.fill( 1, 2).print
s.fill( 1 ).print
s.fill().print

bugfix_2021-01-09.jmo

>lazyErrors

Try
	abc
.catch.info.print
Try
	XYZ
.catch.info.print

bugfix_2021-02-01_type_extends2.jmo

::Bar(Str s, Int i)

::Foo(Int i) ^ Bar("Foo ",i) =foo
	::foo()!!
		("Foo"+i).print
		func.push(i)

Foo(9).foo
Foo(123).foo

Foo(234)

Foo(345)
	it.print

bugfix_2021-02-01_type_extends3.jmo

::Bar(Str s, Int i)
	"Bar Root ".add(i).print

	::foo
		(s+i).print
		#func.push(i)

::Foo(Int i) ^ Bar("F2B-",i) =foo
	"Foo Root ".add(i).print

Foo(9).foo
Foo(123).foo

Foo(234)

Foo(345).foo.print

bugfix_2021-02-01_type_extends3c.jmo

::Bar(Str s, Int i)
	"Bar Root ".add(i).print

	::foo()!!
		(s+i).print
		func.push(i)

::Foo(Int i) ^ Bar("F2B-",i) =foo
	"Foo Root ".add(i).print

Foo(9).foo
Foo(123).foo

Foo(234)

Foo(345)
	it.print

bugfix_2021-02-01_type_extends4.jmo

::Bar(Str s, Int i)
	"Bar: ".add(s).add(i).print

::Foo(Int i) ^ Bar("Foo ", i) =foo
	::foo()!!
		("Foo"+i).print
		func.push(i)

Foo(9).foo
Foo(123).foo

Foo(234)

Foo(345)
	it.print

bugfix_2021-02-23_hex.jmo

hex1 = 0xDEADBEEF
hex2 = 0xdeadbeef
hex3 = 0xdead_beef

hex1.print
hex2.print
hex3.print

0b1100_0101_1111.print

0b1101.print
0x1.print
0xdea.print
0xdead.print
0xdeadb.print
0xdeadbe.print
0xdeadbee.print
0xdeadbeef.print

bugfix_2021-03-12_reduce.jmo

[1,2,3].reduce(10, :b, b[1]+b[2]).print
[1,2,3].reduce(10, each.mem(:x)[1] + x[2]).print
[1,2,3].reduce(0, :b, b[1]+b[2]).print

bugfix_2021-03-22_list_event_handler_1a.jmo

:: Button(Int nr)
	::toStr = "Test".add(nr)
	::@test
	::hit
		"Hit ".add(nr).print
		this.@test #(this)
	::getNr = nr

numButtons = []
{0,9}
	numButtons += Button(it)

{0,9}
	NUM = it
	numButtons[NUM+1]::@test
		("Event on button: "+it.getNr+" / "+NUM+" / "+it).print

numButtons[5].hit
numButtons[2].hit

bugfix_2021-03-22_list_event_handler_2.jmo

:: Button(Int nr)
	::toStr = "Test".add(nr)
	::@test
	::hit
		this.@test

numButtons = []
{0,9}
	numButtons += Button(it)

{0,9}
	NUM = it
	numButtons[it+1]::@test
		("Event1 on button "+NUM).print

numButtons[ 10.times... ].print
numButtons[ 10.times... ]::@test		# Bug?
	("Event2 on button "+it).print

numButtons[5].hit
numButtons[3].hit
numButtons[1].hit

"-----".print

numButtons[ [5,3,1].each... ].hit

bugfix_2021-03-22_list_event_handler_3.jmo

::Button(Int nr)
	::toStr = "Test".add(nr)
	::@test
	::hit
		this.@test("abc")

numButtons = []
{0,9}
	numButtons += Button(it)

{0,9}
	N = it
	numButtons[it+1]::@test
		it.print	# it = "abc"
		("Event on button "+N).print

numButtons[5].hit
numButtons[2].hit

bugfix_2021-03-22_list_event_handler_4.jmo

:: Button(Int nr)
	::toStr
		"Test".add(nr).print	# No return, so result is NIL
	::@test
	::hit
		this.@test

numButtons = []
{0,9}
	numButtons += Button(it)

{0,9} => num
	numButtons[num+1]::@test
		# it = the Button-Object
		it.print	# toStr returns NIL, so nil will be printed
		("Event on button").print

numButtons[5].hit
numButtons[2].hit

bugfix_2021-03-22_list_event_handler_5.jmo

list = ['a','b','c']
list.describe

list[ 3.times... ].print

bugfix_2021-03-23_java1.jmo

# Access to public enum in class:
#   Object o = Desktop.Action.BROWSE;

>prefix "Java"
>* java.awt

If(_Desktop.isDesktopSupported() && _Desktop.getDesktop().isSupported(_Desktop.Action.BROWSE))
	"foo".print

bugfix_2021-03-23_java2.jmo

>* java.io
>* java.net

uri = Java("URI",["http://localhost"])
uri.print
uri.getHost.print
uri.getPath.print

# Okay, but really bad as Test

Try
	Java_Desktop.getDesktop().edit(nil)
.catch.info.print

Try
	f = Java_File("/tmp/foo.txt")
	Java_Desktop.getDesktop().edit(f);
.catch.info.print

bugfix_2021-03-24_gui_event_vce.jmo


>prefix "Swing"

button = _Button("Event")
main = _Main
.add( button )
.size(200,150)
.run

test = 3

"Output must be: 5".print

button::@select
	test.print

test = 5

bugfix_2021-04-14_let_right.jmo

5 % 3 => a
a.print

# Sollte 2 sein

b = 5 % 3
b.print

(5 % 3).print

bugfix_2021-05-04_java_var_type.jmo

>prefix "Java"

########################################################################

Java al1 = Java_ArrayList
al1.types.print

Java_ArrayList al2 = Java_ArrayList
al2.types.print

_ArrayList al3 = Java_ArrayList
al3.types.print

Java_{java.util.ArrayList} al4 = Java_ArrayList
al4.types.print

Print "----------"

Java_Random r = Java("Random")		# = Java_Random
r.types.print		# Object -> Java -> Java_Random

################################################################################

Print '-'*40

Try
	al1.types.print
	al1 = r
	al1.types.print
.catch.info.print

Print '-'*40

Try
	al2.types.print
	al2 = r
	al2.types.print
.catch.info.print

Print '-'*40

Try
	al3.types.print
	al3 = r
	al3.types.print
.catch.info.print

Print '-'*40

Try
	al4.types.print
	al4 = r
	al4.types.print
.catch.info.print

bugfix_2021-05-04_prefix_var_type.jmo

>prefix "Java"

al01 = _ArrayList
al02 = Java_ArrayList
_ArrayList al11 = _ArrayList
_ArrayList al12 = Java_ArrayList
Java_ArrayList al21 = _ArrayList
Java_ArrayList al22 = Java_ArrayList

al01.size.print
al02.size.print
al11.size.print
al12.size.print
al21.size.print
al22.size.print

bugfix_2021-05-04_prefix_var_type2.jmo

>prefix "Foo"

::_Test(Str i)
	::toStr = "test "+i

t01 = _Test("01")
t01.print

t02 = Foo_Test("02")
t02.print

_Test t11 = _Test("11")
t11.print

_Test t12 = Foo_Test("12")
t12.print

Foo_Test t21 = _Test("21")
t21.print

Foo_Test t22 = Foo_Test("22")
t22.print

bugfix_2021-05-19_treeblock.jmo

tree = >>>>
html
	body
		b,
		strong
<<<<

tree.print

### Die Tabulatoren zwischen b und strong entfernen

bugfix_2021-05-31_each_let.jmo

LIST = [3,8,7,0,2,9]

LIST.each
	loop.lap.toStr.begin("Lap: ").print
	it.print
	If(it == 0)
		loop.break

"------------------------------".print

LIST.each => foo
	loop.lap.toStr.begin("Lap: ").print
	Print it+" / "+foo
	If(foo == 0)
		loop.break

bugfix_2021-06-07_controltype_init1.jmo

::MyPrint1(args...)!!
	args.print
	args.each.print
	"---".print

::MyPrint2(args...)!!
	this._init
	args.describe
	args.each.print
	"---".print

###############################################

MyPrint1
MyPrint1 "xyz"
MyPrint1("abc")
MyPrint1(1,'a',"5")

"------------------".print

MyPrint2
MyPrint2 "xyz"
MyPrint2("abc")
MyPrint2(1,'a',"5")

bugfix_2021-06-07_controltype_init3.jmo

::MyPrint1(x1,args...)!!
	args.print
	args.each.print
	"---".print

::MyPrint2(x1,args...)!!
	this._init
	args.describe
	args.each.print
	"---".print

###############################################

MyPrint1 "xyz"
MyPrint1("abc")
MyPrint1(1,'a',"5")

"------------------".print

MyPrint2 "xyz"
MyPrint2("abc")
MyPrint2(1,'a',"5")

bugfix_2021-06-08_args_comma.jmo

::foo( args... )
	args.each.print

this.foo( 2, ',', ",", ",§," )

"----------------------".print

::bar( Object a=',', Object b=",", Object c=",,,", d= [',',","] )
	a.describe
	b.describe
	c.describe
	d.describe
	"-----".print

this.bar()
this.bar(1)
this.bar(1,2)
this.bar(1,2,3)
this.bar(1,2,3,4)

bugfix_2021-06-09_else.jmo

true.else
	it.print
	11.print
.print

"-----".print

false.else
	it.print
	21.print
.print.else
	it.print
	22.print

"-----".print

false.else
	it.print
	31.print
	it = false
.print.else
	it.print
	32.print

bugfix_2021-06-14_regex.jmo

RegEx("^[a-z]*\n$").print.type.print
"^[a-z]*\n$"r.print.type.print
"^[a-z]*\n$"l.print.type.print
"^[a-z]*\n$".print.type.print

Print "foo\nbar"
Print "foo\nbar"l
Print "foo\nbar"r

bugfix_2021-06-18_var_changed.jmo

a = 1
B = 1

:a::@varChanged
	"--- Event: {} / {}".fill(B, it).print

a = 2
a.print
a = 3
a.print

# Für VarLet definieren, und nicht vor dem Wert in der Variable abfangen.

bugfix_2021-06-18_var_def.jmo

a = 5

Print a++
Print a

Print a=++
Print a

bugfix_2021-06-20_funclet_varlet.jmo

a = "foo"
a.print
f = :{:a.set}
f.exec( "bar" ).print.get.print
a.print

"'foo' is correct! A FuncLet should not have access to the surrounding environment!".print

bugfix_2021-06-24_tostr.jmo

::Button(Int nr)
	::toStr = "Test".add(nr)

b1 = Button( 1 )
b2 = Button( 2 )
b3 = Button( 3 )

list = [b1,b2,b3]

list.each
	it.print
	("Foo " + it).print

bugfix_2021-06-25_loop_exit.jmo

# Die IDE bricht nicht ab, nur bei Break

counter = 0
Loop
	counter =++
	(counter == 5)
		Break
	Print counter

counter = 0
Loop
	counter =++
	(counter == 5)
		Exit
		#app.exit
	Print counter

bugfix_2021-06-25_unclosed.jmo

info = [2,3,1,2,1]
last = [1,2,3,4,5]
possible2 = [1,2,3]

r = []
{5} => num
	If( info[num] == 1 )
		r += last[num]
	.else( info[num] == 2 )
		r += possible2[ Random.int( 1, possible2.len) ]
	.else # == 3
		r += possible2[ Random.int( 1, possible2.len) ]

Print r.len

bugfix_2021-08-06_typeuse.jmo

5.typeUse(<Int>,1,2).print
"abc".typeUse( "Str", 'a', 'b' ).print
"abc".typeUse( <Str>, 'a', 'b' ).print

bugfix_2021-08-08_cycle.jmo

# Terminate Cycle correctly

C = Cycle
C::@cycle
	it.print
	C.stop
C.start( 3000 )

Sleep(200)

bugfix_2021-08-08_list_inc1.jmo

XY=[0,0,0]

XY[2]=++
XY.print

XY[2] =++
Print XY

XY[2] = XY[2] ++
Print XY

XY[2] =**
Print XY
XY[2] =//
Print XY
XY[2] =--
Print XY

myList = [2,4,6,9]
myList[1] =++
myList[2] =--
myList[3] =**
myList[4] =//
Describe myList

bugfix_2021-08-14_tree_removenames.jmo

t = >>>>
test
	foo
		bak
	bar
		foo
	alg
	bar
		alg
<<<<

t.print
"-------------------".print
t.removeNames( "foo", "alg" )
t.print

bugfix_2021-08-21_list_loop.jmo

l = [ 1, 2, 3 ]
l.add( l )

Print l
Describe l

Print '-'*40 #######################################

s = [ 1, 2, 3 ]s
s.add( s )

Print s
Describe s

Print '-'*40 #######################################

m = Map
m.add( 'a' -> m )

Print m
Describe m

Print '-'*40 #######################################

t = Table(2)
t.add( 1,2 )
t.add( t,t )
t.add( 5,6 )

Print t
Describe t

Print '-'*40 #######################################

r = Tree
r.add( "node1", 123 ).add( "node2", r )

Print r
Describe r

bugfix_2021-08-22_counter.jmo

>lazyErrors

Try
	({5}).print
.catch.info.print

"-----".print

Try
	{{{{5}}}}.print
.catch.info.print

"-----".print

Try
	{{5},2}.print
.catch.info.print

bugfix_2021-08-22_table1.jmo

table = ||||
true, "\n\\n", 3	
4s, 	"x\\ty", 'a'
"foo\t", [1b,2.0], 9.0
||||

Describe table

bugfix_2021-09-07_type1.jmo

::Foo

Print <Foo>
Print <Foo>.name

bugfix_2021-09-09_multiline_args.jmo

a = 7
type = 'x'.which(
	a < 0,
	a == 1,
	a == 2,
	a == 3 || a == 4, 
	a >= 5 && a <= 8, 
	a >= 9
)	

type.print

a = 7
type = 'x'.which(
	a < 0,
	a == 1,
	a == 2,
	a == 3 || a == 4, 
	a >= 5 && a <= 8, 
	a >= 9
	)	

type.print

bugfix_2021-10-10_incdec.jmo

# So korrekt?

Print 5+3.2
Print 5++3.2
Print "-----"
Print 5.1+3.2
Print 5.1++3.2

Print "---------------"

Print 5-3.2
Print 5--3.2
Print "-----"
Print 5.1-3.2
Print 5.1--3.2

bugfix_2021-10-25_java1.jmo

>prefix "Java"
>package "java.awt"

Print _Desktop.isDesktopSupported()

bugfix_2021-10-25_java2.jmo

>prefix "Java"
>package "java.awt"

Print _Desktop.isDesktopSupported()

bugfix_2021-10-25_java4.jmo

>prefix "Java"
>package "java.awt", "java.net", "java.util"

Print _Desktop.isDesktopSupported()

bugfix_2021-10-25_var_java_type.jmo

>* de.mn77.base.data.group

# Für Variablen den Typ von Java-Klassen mit vollem Pfad speichern!

Java_Group3 v1? = nil
Describe v1

# Hier somit speichern: Java<de.mn77.base.data.Group3>

###################################################
# Dies sollte somit auch gehen:

Java_{de.mn77.base.data.group.Group3} v2? = nil
Describe v2

v1 = v2
Describe v1
v2 = Java_Group3(1,2,3)
v1 = v2
Describe v1
Describe v2

bugfix_2021-11-19_number_parsing.jmo


Print 5* +3

Print 5*+3

Print "------------------------------"

Print 5* -3

Print 5*-3

Print "------------------------------"

Print 3**
Print 5**
Print 5** + 3**
Print 5** +3**

Print 5**+3**

Print "------------------------------"

Print 5** -3**

Print 5**-3**

bugfix_2021-11-28a.jmo

d = Dir("/tmp/foodir")

d.search.describe
d.searchFiles.describe
d.searchDirs.describe
d.delete

bugfix_2021-11-28_unquote.jmo

A = "   \"foo\"   "
B = "   'foo'   "

#########################################

A.unquote.print.describe
"-----".print
A.trim.unquote.print.describe
"-----".print
A.unquote.trim.print.describe

"=============================".print
#########################################

B.unquote.print.describe
"-----".print
B.trim.unquote.print.describe
"-----".print
B.unquote.trim.print.describe

bugfix_2021_04_14_range_let.jmo

{3..9} => x
	x.print

"----------".print

y = 3..9
y.print

"----------".print

3..9 => z
z.print

"----------".print

# Korrekt?

3..9 => t
	t.print

bugfix_2022-01-04_count.jmo

Try
	Count(0)
		Print it
.catch.info.print

Print "----------"

Try
	Count(-2)
		Print it
.catch.info.print

Print "----------"

Try
	Count(0.3)
		Print it
.catch.info.print

Print "----------"

Try
	Count(1.3)
		Print it
.catch.info.print

Print "----------"

Try
	Count(-3, -8)
		Print it
.catch.info.print

Print "----------"

Try
	Count(-8, -4)
		Print it
.catch.info.print

bugfix_2022-01-11_type_extends.jmo

::Foo( Int i, Int j )
	"{} + {} = {}".fill(i, j, i+j).print

::Bar( x ) ^ Foo( x.add(1), x*2 )

Bar( 5 )

bugfix_2022-01-11_type_extends_match.jmo

::Foo ^ List( 3,6,9 )
::Bar ^ Foo

f = Bar
f.add( 11 )

#########################################

t = Table(4)
t.add( :f )
t.describe

Print "---------------------------------"

::Doo
	::test( List l )
		l.implode('_').print

Doo.test( f )

Print "---------------------------------"

::test( List l )
	l.implode('-').print

this.test( f )

bugfix_2022-01-12_extends_it.jmo

::Bar
	::add(Int i)
		Print i

::Foo ^ Bar

	5.times => a
		this.add a

	Print "-----"

	5.times
		it.print
		this.add( it )

	Print "-----"

	it = 9
	this.add( it )

Foo

bugfix_2022-01-12_function_arg.jmo

::Bar
	::setEnabled( Bool b )
		Print b

::Foo
	allFields = [ Bar, Bar, Bar ]

	::setActive( Bool b )
		allFields.each.enabled = b

f = Foo
f.active = true
f.active = false

bugfix_2022-01-15_var_access.jmo

::Foo
	::test( Int i )
		Print i

::Bar ^ Foo
	o = 2
	this.test(o)
	

u = 1
Bar.test(u)

bugfix_2022-01-15_var_access2.jmo

>lazyErrors

::Ccc
	c = 3

	Print "--- Ccc"
	Try
		Print a
	.catch.info.print
	Try
		Print b
	.catch.info.print
	Try
		Print c
	.catch.info.print
	
	this.test

	::test
		Print "--- Ccc.test"
		Try
			Print a
		.catch.info.print
		Try
			Print b
		.catch.info.print
		Try
			Print c
		.catch.info.print

::Bbb ^ Ccc
	b = 2
	this.test
	
	Print "--- Bbb"
	Try
		Print a
	.catch.info.print
	Try
		Print b
	.catch.info.print
	Try
		Print c
	.catch.info.print

##############################
a = 1
Bbb.test

Print "--- Root"
Try
	Print a
.catch.info.print
Try
	Print b
.catch.info.print
Try
	Print c
.catch.info.print

bugfix_2022-01-21_func_default.jmo

::test( Int round, List items = [].init(5,nil) )
	Print round
	Print items

this.test( 1 )
this.test( 2, [9,8,7,6,5] )
this.test( 3, 'a'..'e'.toList )

bugfix_2022-01-21_str_divide.jmo

S = "abcdef"

Print S.explode
Print S.split
Print S.split( "[cd]"r )
Print S.split( "de" )

Try
	Print S.split( 3 )
.catch.info.print

Print S.group( 2 )
Print S.group( 3 )
Print S.group( 4 )

Print "----------"

Print S / 1
Print S / 2
Print S / 3
Print S / 4
Print S / 6
Print S.div(2)

bugfix_2022-01-28_map_key.jmo

# Duplicated Key ?!?

::Item( Int nr )
	::toStr = "Key " + nr

m = Map

i1 = Item(1)
i2 = Item(2)
i3 = Item(3)

m.add( i1, 'a' )
m.add( i2, 'b' )
m.add( i3, 'c' )

m.get( i2 ).print

bugfix_2022-01-28_power.jmo

b = 5b
b =**
Print b

b = 5b
b **= 3
Print b

Print "------------------------------"

s = 5s
s =**
Print s

s = 5s
s **= 3
Print s

Print "------------------------------"

i = 5
i =**
Print i

i = 5
i **= 3
Print i

Print "------------------------------"

l = 5l
l =**
Print l

l = 5l
l **= 3
Print l

Print "------------------------------"

a = 5a
a =**
Print a

a = 5a
a **= 3
Print a

Print "------------------------------"

c = 5c
c =**
Print c

c = 5c
c **= 3
Print c

Print "------------------------------"

f = 5f
f =**
Print f

f = 5f
f **= 3
Print f

Print "------------------------------"

d = 5d
d =**
Print d

d = 5d
d **= 3
Print d

Print "------------------------------"

z = 5z
z =**
Print z

z = 5z
z **= 3
Print z

bugfix_2022-01-31_variable_access_1.jmo

::Button
	::setEnabled(Bool b)
		Print b
		
::FieldButton ^ Button

field = FieldButton
::setFoo(b)
	field.enabled = true
	field.enabled = b

this.foo = false

bugfix_2022-01-31_variable_access_2.jmo

::Button
	::setEnabled(Bool b)
		Print b
		
::FieldButton ^ Button

::Game
	field = FieldButton
	
	::setActive(Bool b)
		field.enabled = true
		field.enabled = b

game = Game
game.active = false

bugfix_2022-02-03_args_ext.jmo

>lazyErrors

::Bar
::Foo ^ Bar

f = Foo

Try
	f.typeUse( "Foo", 1, 2 ).print
.catch.info.print
Try
	f.typeUse( <Foo>, 1, 2 ).print
.catch.info.print
Try
	f.typeUse( "Bar", 1, 2 ).print
.catch.info.print
Try
	f.typeUse( <Bar>, 1, 2 ).print
.catch.info.print
Try
	f.typeUse( 123, 1, 2 ).print
.catch.info.print

bugfix_2022-02-08_argument_calc.jmo

# Why will be the argument calculated, where no argument is required?
# --> Solution is possible, but not worth the effort

>lazyErrors

::foo()
	Print "Foo"

::bar()!!
	Print "Bar"

::bak()!!
	func.init
	Print "Bak"

Try
	this.foo( Error("Foo","Bar").throw )
.catch.info.print

Try
	this.bar( Error("Foo","Bar").throw )
.catch.info.print

Try
	this.bak( Error("Foo","Bar").throw )
.catch.info.print

Try
	this.foo( 1, 2, 3 )
.catch.info.print

bugfix_2022-02-08_control_function.jmo

::MyTest = main
	::main!!
		§ = func.push(nil)

::fox
::foo = nil
::bar!! = nil
::bak? = nil

MyTest
	Print "foo"
	Print it
	it = 9
.print

Print "-------------------"
Print '1'
this.fox.print
Print '2'
this.foo.print
Print '3'
this.bar.print
Print '4'
this.bak.print

bugfix_2022-02-19_control_type.jmo

::Foo( Bool test )
	::foo
		this._init

Try
	Foo( true ).foo.print
.catch.info.print

bugfix_2022-03-24_prefix_function_argtype.jmo

>prefix = "Foo"

::_Main
	::toStr = "abc"

::_Test(_Main m)
	Print m

::test(_Main mm)
	Ident mm
	Print mm

_Main main = _Main
_Test t = _Test(main)
t.print

Print "-----"

this.test(main)

bugfix_2022-03-25_list_toStr.jmo

::Item(Str name)
	::toStr = name
	::toIdent = "Item:"+name
	::toDescribe = "ITEM>"+name
::Task(Str name)
	::toStr = name
::Grml

i1 = Item("Foo")

t1 = Task("Kab")
g1 = Grml

l = [ i1, t1, g1, "abc", 'x', 123 ]

Print l
Ident l
Describe l

Print "----------"

Print i1
Ident i1
Describe i1

Print "----------"

Print t1
Ident t1
Describe t1

Print "----------"

Print g1
Ident g1
Describe g1

bugfix_2022-03-25_super_func_const.jmo

::Bar
	::add( Int i )
		Print i

::Foo ^ Bar
	ABC = 5
	super.add( ABC )
	this.add( ABC )
	Print "-----"

	[3,6,9].each
		TEST = it
		TEST.print
		super.add( TEST )
		this.add( TEST )	# FEHLER!!! Aber nur im "each"
		Print "-----"

Foo

bugfix_2022-03-25_super_func_const2.jmo

::Bar(Int x)
	::add( Int i )
		1.times
			Print i+x

::Foo(Int y) ^ Bar(y+1)
	ABC = 5
	super.add( ABC )
	this.add( ABC )
	Print "-----"

	[3,6,9].each
		TEST = it
		TEST.print
		super.add( TEST )
		this.add( TEST )	# FEHLER!!! Aber nur im "each"
		Print "-----"

Foo(100)

bugfix_2022-04-05_format_string.jmo

S = "abc DeF gh\t\n123"
S.print

"{s:1cE}".fill(S).print
# 'abc DeF gh\t\n123'

"{s:1CE}".fill(S).print
# 'Abc DeF Gh\T\N123'

bugfix_2022-04-28_overflow.jmo

::Test2
	::foo1
		this.foo1

Try
	Test2.foo1
.catch.show

bugfix_2022-05-01_format_string.jmo

Print "My dog {:c} runs {:C} through {:e}.".fill("Bruno", "happily", "the garden")

bugfix_2022-07-08_list.jmo

[].min.print		#Fehler
[4,6,2].min.print

Print "-----"

[].max.print		#Fehler
[4,6,2].max.print

Print "-----"

['2',"4"].min.ident
['2',"4"].max.ident
['2',"4"].avg.ident

Print "-----"

[true,1b,2s,3i,4l,9c,5f,6d,'7',"8","abc",Random].min.ident
[true,1b,2s,3i,4l,9c,5f,6d,'7',"8","abc",Random].max.ident
[true,1b,2s,3i,4l,9c,5f,6d,'7',"8","abc",Random].avg.ident

bugfix_2022-07-08_nil_add.jmo

a? = nil
b? = nil

Ident a? + " " + b?
Ident " " + b?
Ident a? + ' ' + b?
Ident ' ' + b?
Ident a? + 3 + b?
Ident 3 + b?
Ident a? + 4.0 + b?
Ident 4.0 + b?

bugfix_2022-07-10_jaymo_types.jmo

this.types.print
app.types.print
jaymo.types.print

[4].map(each.types).describe
3.print(cur.types)

bugfix_2022-09-05_proc.jmo

# Auto-VarLet is removed

a = 0; 5.times.proc(:b, a+=b); a.print

bugfix_2022-09-15_var_modifier.jmo

Try
	Object? a = 1
	a.print
	a? = nil
	a.print
	a? = 'a'
	a.print
.catch
	it.message.print
	it.detail.print

Print "-----------------------------------"

Try
	Object a? = 2
	a.print
	a? = nil
	a.print
	a? = 'b'
	a.print
.catch
	it.message.print
	it.detail.print

Print "-----------------------------------"

Try
	Object? a? = 3
	a.print
	a? = nil
	a.print
	a? = 'c'
	a.print
.catch
	it.message.print
	it.detail.print

bugfix_2022-11-16_varlet.jmo

:abc.pass
	it.print
	a = 5
	it.set( a)
	it.get.print
	it.print
	abc.print

"---".print

abc.print

bugfix_2022-11-16_varlet_vce.jmo



::test( List l1, List l2 )
	Print "Test : {} {}".fill(l1,l2)
	#__DEBUG.vce

	If( l1.len == 1 || l2.len == 1)
		Return
	.else
		:p.let( l1.start(2) )
		#Ident p

		q = l2.start(2)
		#Ident q

		#__DEBUG.vce

		this.test( p, q )
		"Ident: {} {}".fill(p,q).print

################################################

:tl.set( [16, 23, 37, 49] )
Print tl
tl = [ 11,22,33,44 ]
Print tl

Print '-'*40

this.test( tl, [2,4,6,8] )

bugfix_2022-11-25_varargs_templet.jmo

"123".print([4,6,9])

Print

[4,6,9].toStr.print
[4,6,9]:.toStr.left(8).print

Print

"123".add([4,6,9]).print
"123".add([4,6,9]:).print

Print

L = [4,6,9]
"123".add(L).print
"123".add(L:).print

bugfix_2022-11-28_cur.jmo

Print "--- Root ---"
cur.describe
this.describe
it.describe

::Foo
	Print "--- Foo ---"
	cur.describe
	this.describe
	it.describe

	::test
		Print "--- test ---"
		cur.describe
		this.describe
		it.describe

Foo.test

bugfix_2022-11-29_literal.jmo

"\"\0".describe
"\"\0"l.describe.print

secs = 123
´("echo -ne \""+  secs + "\\033[0K\r\"")´o.print
´("echo -ne \""+  secs + "\033[0K\r"l + '"')´o.print

bugfix_2022-11-30_dec_tostr.jmo

(-6.7//-8).print
"{}".fill(-6.7//-8).print
"{5}".fill(-6.7//-8).print

bugfix_2022-11-30_double_tostr.jmo

(-6.7d//-8d).print
"{}".fill(-6.7d//-8d).print
"{5}".fill(-6.7d//-8d).print

bugfix_2022-12-16_tablestyle.jmo

t = Table(2)
t.add( "abc", 123 )
t.style("R").print

bugfix_2022-12-19_conversion.jmo

1l.MAX_VALUE.print.toDouble.print.toLong.print
Print
1l.MAX_VALUE.print.toDouble.print.toBigInt.print
Print
1l.MAX_VALUE.print.toFloat.print.toBigInt.print
Print
1l.MAX_VALUE.print.toBigDec.print.toBigInt.print

bugfix_2022-12-19_whitespace.jmo

Describe  12345s
Describe -12345s
Describe    240s

Print

123.print
Print
123.print('a')
123.print( 'b' )
Print
123.print 'c'
123.print  'd'
123.print    'e'
123.print     'f'

bugfix_2022-12-20_atomic_len.jmo

100000000i.print.describe.len.print
100000000l.print.describe.len.print
100000000c.print.describe.len.print
100000000f.print.describe.len.print
100000000d.print.describe.len.print
100000000z.print.describe.len.print
1E8.describe.len.print
1E8c.describe.len.print

Print

1E15f.describe.len.print
1E15d.describe.len.print
1E15a.describe.len.print
1E15z.describe.len.print

Print

(1E300d.toBigDec * 2).describe.len.print

bugfix_2022-12-20_infinity_conversion.jmo

Try
	not_a_number.describe.toBigDec.print
.catch.info.print

Try
	infinity.describe.toBigDec.print
.catch.info.print

Try
	+infinity.describe.toBigDec.print
.catch.info.print

Try
	-infinity.describe.toBigDec.print
.catch.info.print

Print "---------------------------"

Try
	1f.MIN_VALUE.toBigDec.print
.catch.info.print

Try
	1f.MAX_VALUE.toBigDec.print
.catch.info.print

Print "---------------------------"

Try
	1d.MIN_VALUE.toBigDec.print
.catch.info.print

Try
	1d.MAX_VALUE.toBigDec.print
.catch.info.print

bugfix_2022-12-20_number_infinity.jmo

1E500f.describe.type.print
Print
1E500d.describe.type.print
Print
1E500a.describe.type.print
Print
1E500z.describe.type.print

bugfix_2022-12-28_bytearray.jmo

B = [72,97,108,108,111]b
Describe B
B.arrange(Charset.CP1252).print

"-------------".print

[72,97,108,108,111]b.arrange(Charset.CP1252).print

"-------------".print

[72,97,108,109,111]s.sum.print
[72,97,108,109,111]l.sum.print
[72,97,108,109,111].sum.print

bugfix_2022-12-29_big_e.jmo

1E15f.describe
1E15d.describe
1E15a.describe
1E15z.describe

1E-15f.describe
1E-15d.describe
1E-15a.describe
1E-15z.describe

Print "-------------"

1e15f.describe
1e15d.describe
1e15a.describe
1e15z.describe

1e-15f.describe
1e-15d.describe
1e-15a.describe
1e-15z.describe

bugfix_2022-12-29_table_style_linebreak.jmo

t = Table(2)
t.add( "ab\ncd", "uvw\nxyz" )
t.add( "gh\nij", "xy" )
t.add( "ef", "op\nqrst" )

t.print
t.style("b!::*-").print
t.style("b!-").print

bugfix_20220614_text.jmo



::cut(Str f, Str x)
	x.lines.each => line
		(line.len > 0)
			vb = line.split('–').map(each.trim)
			vb.ident
			s = "cut " +f+' '+ vb[1] + " "+ vb[2]
			s.ident

##########################

file = "file.csv"
""""
24:25 – 29:17
38:29 – 41:52
"""" => t
this.cut(file, t)

bugfix_2023-01-04_templet.jmo

l = [4,5,6]
[1,2,3].add( l: ).print

bugfix_block-it.jmo

{3}
	it.print
.print

"---".print

{3}
	it.print(it+it)
.print

"---".print

3.times
	it.print

"---".print

3.times.print

bugfix_call_self_func.jmo

::foo
	§= "0".print.toBool
	
°foo.print
°foo
this.foo

a=1.toBool && this.foo
a.print

a=1.toBool && °foo
a.print

a=1.toBool && °foo.print
a.print

bugfix_char_comma.jmo

test="123.45"
test.print

test.replace('.', ",").print
test.replace(".", ",").print
test.replace(".", ',').print
test.replace('.', ',').print

bugfix_combine_comment.jmo

"bla".pass
	it.print
	"123".print
	#Comment
.print

bugfix_comma.jmo

a=1
b=2

(""+a+","+b).print

bugfix_do_error1.jmo

c="fb4e568623b5f8cf7e932e6ba7eddc0db9f42a712718f488bdc0bf880dd3"
c.print

l=[]
{1, c.length, 2}
	p=c.cut(it,2)
	l.add(p)
	l.print
l.print

l=[]
{1, c.length, 2}
	l.add(c.cut(it,2))
	l.print
l.print

bugfix_do_error3.jmo

l=[]
{1, 10}
	it.print
	p=it

	l.add(p)
	l.print

	l.add(it)
	l.print
l.print

bugfix_function_direct.jmo

von="abcde"

# geht:
((von.length) < 8).print

# Parse-Fehler:
(von.length < 8).print

# Evtl. (short):

bugfix_groupchar.jmo

ziel="bla"
("atril \""+ziel+'"').print

bugfix_inc_dec_prio.jmo

a=2;a++.add(4).++.print;a.print
a=2;a++.add(4).print;a.print
a=2;a.add(4)++.print;a.print #7 2 korrekt
a=2;a.add(4).print;a.print	#6 2 korrekt
a=2;(a++.++).print;a.print	#4 3 ist korrekt

a=2;a++.print;a.print	#3 3 korrekt!

a=2; a++.--.print.++.print;a--.print;a.print	#2 3 2 2

bugfix_logical_prio.jmo

(true  !|| true ).print
(true! !|| true ).print
(true  !|| true!).print
(true! !|| true!).print

(true!!!!||true!).print
(true!!!!!||true!).print

bugfix_multicall1.jmo

l = [].add( [4,8,2,5,1].each.print.passIf(cur < 5)... )
l.print

l = [].add( [4,8,2,5,7].each.print.passIf(cur < 5)... )
l.print

l = [].add( [9,8,2,5,7].each.print.passIf(cur < 6)... )
l.print

l = [].add( [9,8,2,5,7].each.print.passIf(cur < 2)... )
l.print

l = [].add( [].each.print.passIf(cur < 2)... )
l.print

bugfix_par-block.jmo

2.times
	it = 4.print
	it.print

"bla".pass
	it = (it * 3).sub('l')
.print

a= "abc".pass
	it = it.add("def").print
a.print

°try
	2.times
		it = 4.print
		it.print
.catch
	it.print

bugfix_quicksort_shortest.jmo

::qsort(l)
	(l.len<=1).if.proc(§=l)
	§=°qsort(l.start(2).filter(each<=l[1])).add(l[1]).concat(°qsort(l.start(2).filter(each>l[1])))

tl = [16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19]
°qsort(tl.print).print

bugfix_regex-chars.jmo

"Blabla\n".print

cmd = "ffmpeg -i \"" + "test.mp4" + "\" "
cmd.print

"TestTest".print
"Test\"Test".print
"Te\tst\"Test".print
"Te\tst\"Te\nst".print

bugfix_return.jmo

::Test
	::get
		§= 5

::test
	§= 4

Test.get.print
°test.print
"End".print

bugfix_str_cut_bounds.jmo

Try
	"right".cut(1,-1).print
.catch.detail.print

"right".cut(1,0).print

Try
	"right".sub(2).print
.catch.detail.print

"right".start(2).print

Try
	"right".part(3).print
.catch.detail.print

Try
	"right".cut(2).print
.catch.detail.print

Try
	"right".sub("gh").print
.catch.detail.print

"right".end(2).print

##### .cut #####

('-'*30).print

::cut(from,len)
	#(from+','+len).print	# PRÜFEN!!!
	"--> {} - {}".fill(from,len).print
	Try
		"right".cut(from,len).print
	.catch.detail.print

### TODO: beide Argumente mit min und max testen.
°cut(0, 1)
°cut(1, 1)
°cut(3, 1)
°cut(5, 1)
°cut(6, 1)

°cut(3,0)
°cut(3,1)
°cut(3,2)
°cut(3,3)
°cut(3,4)
°cut(3,1000)

('-'*30).print

::cutTo(from,to)
	"--> {} - {}".fill(from,to).print
	Try
		"right".part(from,to).print
	.catch.detail.print

### TODO: beide Argumente mit min und max testen.
°cutTo(0, 1)
°cutTo(1, 1)
°cutTo(3, 1)

°cutTo(1, 4)
°cutTo(2, 4)
°cutTo(3, 4)
°cutTo(4, 4)
°cutTo(6, 4)

°cutTo(3, 3)
°cutTo(3, 4)
°cutTo(3, 5)
°cutTo(3, 6)

bugfix_str_fill_count.jmo

format = "a '{}','{}','{}' b"

format.try
	it.fill(1,2,3).print

format.try
	it.fill(11,12).print

format.try
	it.fill(21,22,23,24).print

format.print

bytearray_1.jmo

::test(IntNumber n)
	"---------------------".print
	n.type.echo
	" ".echo
	n.print
	"---------------------".print
	
	bl = n.bytes
	bl.print
	
	If(bl.len >= 1)
		bl[1] = 1b
	If(bl.len >= 2)
		bl[2] = 2b
	If(bl.len >= 4)
		bl[3] = 3b
		bl[4] = 4b
	If(bl.len == 8)
		bl[5] = 5b
		bl[6] = 6b
		bl[7] = 7b
		#bl[8] = 128b
		#bl[8] = -128b
		bl[8] = 8b

	bl.print

	Try
		bl.toByte.print
	.catch.info.print
	Try
		bl.toShort.print
	.catch.info.print
	Try
		bl.toInt.print
	.catch.info.print
	Try
		bl.toLong.print
	.catch.info.print

this.test( 123b )
this.test( 12345s )
this.test( 1234567i )
this.test( 123456789l )

"---------------------------------------------------".print
123b.print.toByteArray.print.toByte.print
123s.print.toByteArray.print.toShort.print
123i.print.toByteArray.print.toInt.print
123l.print.toByteArray.print.toLong.print
"---------------------------------------------------".print

ba = ByteArray(5)
Count( ba.len )
	ba[ it ] = (it + 63).toByte

ba.describe
Print "---"
ba.toStr.print
ba.toIdent.print
ba.toDescribe.print
Print
ba.arrange.print
ba.arrange(Charset.US_ASCII).print
ba.arrange(Charset.ASCII).print
Print
ba.arrange(Charset.UTF8).print
ba.arrange(Charset.UTF16).print
ba.arrange(Charset.UTF16LE).print
ba.arrange(Charset.UTF16BE).print
ba.arrange(Charset.UTF_8).print
ba.arrange(Charset.UTF_16).print
ba.arrange(Charset.UTF_16LE).print
ba.arrange(Charset.UTF_16BE).print
Print
ba.arrange(Charset.ISO8859_1).print
ba.arrange(Charset.ISO8859_15).print
ba.arrange(Charset.CP850).print
ba.arrange(Charset.CP1252).print

bytearray_3.jmo

ByteArray ba = ByteArray(5)
ba.print
ba.toIdent.print
ba.fill(111b).toIdent.print
ba.print
"----------------------------------------".print

ba[1] = 11b
ba[2] = 22b
ba[3] = 33b
ba[4] = 44b
ba[5] = 55b

ba.print
"----------------------------------------".print

ba.toList.describe
ba.cut(2,2).print
ba.part(2,4).print
ba.left(3).print
ba.right(3).print
ba.start(3).print
ba.end(3).print
ba.print

"----------------------------------------".print

ba.each.print
ba.each
	it.print

"----------------------------------------".print

ba[1] = 1b
ba[2] = 2b
ba[3] = 3b
ba[4] = 2b
ba[5] = 1b

ba.print

ba.contains(44b).print
ba.contains(2b).print
ba.contains(44b).print
ba.contains(2b).print
ba.search(44b).print
ba.search(2b).print
ba.searchFirst(44b).print
ba.searchFirst(2b).print
ba.searchLast(44b).print
ba.searchLast(2b).print

"----------------------------------------".print

ba.expandLeft(5).print
ba.expandRight(5).print
ba.print

"----------------------------------------".print

ba[1] = 1b
ba[2] = 2b
ba[3] = 3b
ba[4] = 4b
ba[5] = 5b

ba.print

(ba + 6b).print
ba.add( 7b ).print
ba.append( 8b ).print

ba.print

(ba - 3).print
ba.delete( 1 ).print
ba.delete( 2 ).print
ba.delete( 3 ).print
ba.delete( 4 ).print
ba.delete( 5 ).print

ba.print

"----------------------------------------".print

ba.insert(9b, 1).print
ba.insert(9b, 3).print
ba.insert(9b, 5).print
ba.insert(9b, 6).print
ba.insert(9b, -1).print
ba.insert(9b, -2).print
ba.begin(9b).print
ba.print

"----------------------------------------".print

ByteArray ba2 = ByteArray(5)
ba2[1] = 11b
ba2[2] = 12b
ba2[3] = 13b
ba2[4] = 14b
ba2[5] = 15b

ba.print
ba2.print

ba.concat( ba2 ).print
ba2.concat( ba ).print

bytearray_shortcut.jmo

ba = []b
ba.describe

ba = [12b,34b,56b]b
ba.print
ba.describe

ba.add(123b).print
ba.add(67b).print
ba.print

ba[2]=98b
ba.print

ba = [128,129,132,148]b
ba.print

ba = [12b,34s,45i,67l,78a]b
ba.print

ba = ByteArray(3).print.content(89,78,65).print
ba.print

ByteArray(2).content(78,65).print
ByteArray(2).content(65b,79b).print

bytearray_tostrhex.jmo

"abc".bytes.toStrHex.print

case_2021-01-11_var_func_set.jmo

# This is correct!
# this.foo calls always a function
# foo alone leads to the variable

::setFoo(o)
	"Set: ".add(o).print

foo = 1
foo.print

this.foo = 2
foo.print

this.setFoo(4)
foo.print

catchAllErrors_2a.jmo

m = Swing_Main.setTitle("Foo").setSize(600,400)

b1 = Swing_Button("Click me")
b1::@select
	Error("Message","Detail").throw

b2 = Swing_Button("Click me")
b2::@select
	File("/tmp/xyz124.qwertz").read

m.add(b1, b2)
m.run

catchAllErrors_2b.jmo

app::@error
	Print "Ein Fehler ist aufgetreten"
	it.print
	it.info.print

m = Swing_Main.setTitle("Foo").setSize(600,400)

b1 = Swing_Button("Click me")
b1::@select
	Error("Message","Detail").throw

b2 = Swing_Button("Click me")
b2::@select
	File("/tmp/xyz124.qwertz").read

m.add(b1,b2)
m.run

catchAllErrors_3a.jmo

this.async
	File("/tmp/xyz124.qwertz").read

catchAllErrors_3b.jmo

app::@error
	Print "Oh, there is an error!"
	it.print
	it.info.print

# Diese Zeile erzeugt einen Fehler
this.async
	File("/tmp/xyz124.qwertz").read

char.jmo

'g'
'h'.print

('a'++).print
('a'+2).print
('a'++2).print
('w'--).print

('w'--3).print

('-'*20).print

('f'>'u').print
('f'<'u').print
('f'=='u').print
('f'!='u').print
('f'<>'u').print

('-'*20).print

'w'.toBool.print
'0'.toBool.print
'1'.toBool.print
't'.toBool.print
'w'.toChar.print
'w'.ord.print
'w'.toStr.print
'A'.ord.print

chars-utf8.jmo

("A" + "\u00ea" + "\u00f1" + "\u00fc" + "C").print

"A\u00ea\u00f1B\u00fc\u00faC".print

'a'.print
'\t'.print
'\u00ea'.print

chars_20200321.jmo

::test(Chars c)
	"----- ".add(c).add(" -----").print
	c.append(2,true,'-',"foo").print
	c.add(2,true,'-',"foo").print
	c.add(2,true,'-',"foo").print
	(c+'f').print
	
	(c*5).print
	c.mul(5).print
	
	c.upper.print
	c.caseUp.print
	
	c.lower.print
	c.caseDown.print
	
	c.len.print
	c.get(1).print
	c[1].print
	c.change(1, 'q').print

°test('x')
°test("xyz")

chars_20210112.jmo

L = [ 'c', 'C', ' ', '9', '%', "abc", "aBc", "ABC", "123", "a23", "§%&", "  ", "" ]

L.each => c?  #(:c??)
	("--- "+c+" -------").print
	("Number: " + c.isNumber).print
	("Upper:  " + c.isCaseUp).print
	("Lower:  " + c.isCaseDown).print
	("Blank:  " + c.isBlank).print
	(c.type == <Str>)
		("Empty:  " + c.isEmpty).print
	(c.type == <Char>)
		("Letter: " + c.isLetter).print

char_2.jmo

'#'.echo
'\t'.echo
'-'.echo
'	'.echo
'|'.print

'a'.upper.print
'B'.lower.print
'c'.caseUp.print
'D'.caseDown.print

char_2020-03-22.jmo

::test(Char c)
	"--- Test: {} ---".fill(c).print
	("Is number:    "+c.isNumber).print
	("Is Letter:    "+c.isLetter).print
	("Is case up:   "+c.isCaseUp).print
	("Is case down: "+c.isCaseDown).print
	
°test('a')
°test('B')
°test('-')
°test('.')
°test('5')
°test('ß')
°test('ä')
°test('+')

char_3.jmo

"a\nb\nc".replace('\n',',').print
','.print
'.'.print
'''.print
("a"+'\n'+"b").print
"---".print
("c"+'\n'+"").print
"---".print
(""+'\n'+"d").print
"---".print
'\n'.print
"---".print
"".print
"---".print
"\n".print
"---".print
'\''.print
' '.print
'\\'.print
"12,34".replace(',','.').toDec.add(1).print

char_alphabet.jmo

'a'.alphabet.print
'c'.alphabet.print
'x'.alphabet.print
'z'.alphabet.print
'@'.alphabet.print
'5'.alphabet.print
'A'.alphabet.print
'C'.alphabet.print
'X'.alphabet.print
'Z'.alphabet.print

char_ord_chr_convert.jmo

'a'.ord.print
'7'.ord.print
'7'.toInt.print

6.toChar.print
64.chr.print

'1'.toInt.toChar.print
'1'.ord.chr.print
'x'.ord.chr.print
65.chr.ord.print

2.0.toChar.print

char_unicode.jmo

'a'.toUnicode.print
"\u0061".print
"\u2202".print
'Ü'.toUnicode.parseUnicode.print
"\\u0069".parseUnicode.print

cipher_1.jmo

DATA = "Foo bar bak test".bytes

::test(Cipher c, Str key)
	c.key = key.bytes
	e = Base64.encode( c.encrypt(DATA) ).bytes.tee(cur.arrange(Charset.ASCII).print)
	c.decrypt( Base64.decode( e ) ).arrange.print

this.test( CipherBlowfish, 	"abcdef012345" )
this.test( CipherDES, 		"abcdef01" )
this.test( CipherTripleDES, "abcdefghijkl012345678901" )
this.test( CipherRC2, 		"abcdef012345" )
this.test( CipherRC4, 		"abcdef012345" )

classic_each.jmo

s = "abcdef"
Each( s )
	Print it

l = [6,7,8,1,2,4,5]
Each( l )
	Print it

Each( l ).print
Each( [ 4,5,6 ] ).each.print
Each( [ 7,8,9 ] ).each
	it.print

classic_for.jmo

For(i = 3, i < 9, i=++).print
For(i = 3, i < 9, i=++).each.print

"----------".print

For(i = 3, i < 9, i=++)
	it.print

"----------".print

x = 'a'
For(nil, x <= 'd', nil)
	it.print
	x.print
	x=++

"----------".print

For(i=1, i <= 4, 9)
	it.echo
	i.print
	i=++

"----------".print

For(c='z', c >= 'q', c--=2)
	it.print

"----------".print

u = For(i = 3, i<6, i=++).each.print
"Result: ".echo
u.print

"----------".print

For('a', each <= 'd', each++)
	it.print

"----------".print

r=1
For(cur.echo('a').print.proc('a'), cur.echo('b').echo.echo(": ").proc(r<=3).print, cur.echo('c').print.proc(8))
	"Loop: ".echo
	it.echo
	r.print
	r=++

cmd_book.jmo

´echo 1´
´echo 2´o
´echo 3´b
"-------------".print
´echo 1´o.print
Cmd("echo 2").buffer.output.print
Cmd("echo 3").buffer.result.print
output = Cmd("echo 4").buffer.output
output.print
res = ´echo 5´o
res.print

Cmd("echo 6").buffer.print

nr = 3
´( "echo " + nr )´o.print

c = Cmd("echo 7")
c.buffer.print
c.buffer.print

cmd_forget.jmo

s2 = "/home/mike/Desktop/Trump – Ahuwah Zeus.pdf"
Cmd("atril \""+s2+'"').forget

collection_single_object.jmo

l = List

t = Table(5,3,l)
t.print

l.add( 9 )
t.print

l.add( 1 )
t.print

Print "--------------------"

l = []
x = [l,l,l]

x.print
l.add( 9 )
x.print
l.add( 1 )
x.print

colors_enum.jmo


Color.BLACK.print

ColorRGB.BLACK.print

Color.BLUE.print

ColorHSL.RED.print.type.print

####################################

Print "-------------"

rgb = ColorRGB(127,127,255)

rgb.GREEN.toIdent.print
rgb.GREEN.toDescribe.print

colors_tostr.jmo

Print Color
Print Color.toIdent
Print Color.toDescribe
Print Color.GREEN
Print Color.GREEN.toIdent
Print Color.GREEN.toDescribe
Print ColorRGB
Print ColorRGB.toIdent
Print ColorRGB.toDescribe
Print ColorHSV
Print ColorHSV.toIdent
Print ColorHSV.toDescribe
Print ColorHSL
Print ColorHSL.toIdent
Print ColorHSL.toDescribe

command.jmo

# Ausgabe 1 > output
`echo 1`
Cmd("echo -n 2").buffer.output.print

Cmd("echo 3").buffer.out.print
Cmd("ls -d /h*").buffer.output.print
Cmd("echo 4").buffer.output

a=Cmd("echo 5").buffer.output;"Ergebnis: ".echo;a.print

Cmd("echo 6").buffer.print

command_1.jmo


c= Cmd("echo 54").buffer
"---".print
c.output.print
c.result.print
"=====".print

i= `echo 55`
"---".print
i.print

"=====".print
s= `echo 55`o
"---".print
s.print

"=====".print
f= `echo 55`b
"---".print
f.print

command_2.jmo


`ls -d`.print

"-----".print

Cmd("ls -d /home/m*").buffer.output.print
Cmd("ls -d /home/m*").buffer.out.lines.each.replace('m','M').print
Cmd("ls -d /home/m*").buffer.output.lines.each.replace('e','?').print

"-----".print

`sh -c 'echo abc'`
`echo 'def'`
`sh -c 'echo ghi'`o
`echo 'jkl'`o
`sh -c 'echo mno'`b
`echo 'pqr'`b

"-----".print

Cmd("echo 'stuvwxyz'").buffer.out.left(3).print

command_3.jmo

(1.print)
(2.print).print
(3.print).pass
	("3 >"+it).print
(4.print.toBool)
	("4 >"+it).print

(6.print.toBool).if
	("6 >"+it).print

Group("11".print)
Group("12a".print).print
Group("12b".ident).ident
Group("12c".describe).describe
Group("13".print.toBool).get
	("13 >"+it).print
Group("14".print.toBool).get
	("14 >"+it).print
Group("15".print).get.print

Group("17".print.toBool).get.if
	("17 >"+it).print

If(true.print)
If(true.print)
	"foo".print

('-'*30).print

`echo 1`o
`echo 2`o.print

Cmd("echo -n 11")
Cmd("echo -n 12").print
Cmd("echo -n 13").buffer.out.print
Cmd("echo -n 14").buffer.output.print
Cmd("echo -n 15").buffer.print
Cmd("echo -n 16").buffer.result.print
Cmd("echo -n 17").buffer.output.lines.describe

command_4.jmo

Cmd("echo 11").print
Cmd("echo 12").buffer
Cmd("echo 13").buffer.print
Cmd("echo 14").buffer.out.print
Cmd("echo 15").pass
Cmd("echo 16").pass.print

('-'*10).print

´echo 21´.print
´echo 22´
´echo 23´.print
Cmd("echo 24").buffer.out.print
´echo 25´.pass
´echo 26´.pass.print
Cmd("echo 27").buffer.pass.out.print

('-'*10).print

"echo 31".print
"echo 32".cmd.buffer
"echo 33".cmd.buffer.print
"echo 34".cmd.buffer.out.print
"echo 35".cmd.live.print

('-'*10).print
###############

Cmd("echo 41").pass
	it.print
Cmd("echo 42").pass
	it.print
Cmd("echo 43").buffer.pass
	it.print

('-'*10).print

´echo 51´.pass
	it.print
´echo 52´.pass
	it.print

('-'*10).print

"echo 62".cmd.buffer.pass
	it.print

command_5.jmo

´echo 123´.describe
Print
´echo 123´o.describe
Print
´echo 123´o.describe	# p
Print
´echo 123´e.describe
Print
´echo 123´b.describe
Print
´echo 123´r.describe
Print
´echo 123´l.describe

Print ('-'*70)

2.times.´echo´.describe
Print
2.times.´echo´o.describe
Print
2.times.´echo´o.describe	# p
Print
2.times.´echo´e.describe
Print
2.times.´echo´b.describe
Print
2.times.´echo´r.describe
Print
2.times.´echo´l.describe

command_5.jmo

# Umsetzung für JM°:
# ls |cut -d'_' -f1-2|uniq|sort
#################################

´ls /home/mike/Prog/JayMo/tests_local/testdir´
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´.print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.type.print
"----------".print
l = ´ls /home/mike/Prog/JayMo/tests_local/testdir´o
l.print
l = ´echo 123´o
l.print
"----------".print
Try
	´exit 3´o.print
.catch.info.print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.len.print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lines.len.print
Cmd("ls /home/mike/Prog/JayMo/tests_local/testdir").buffer.out.len.print
"----------".print
`ls /home/mike/Prog/JayMo/tests_local/testdir`o.contains('t').print
´´o.print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.reduce(0, :e, e[1] + e[2].equals('t').use(1,0) ).print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.amount(each=='t').print
"abcdef".field('c',1).print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lines.each.field('e',1).print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lines.each.field('e',2).print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lines.each.field('e',3).print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lines.each.fields('e',1,2).print
"----------".print
´ls /home/mike/Prog/JayMo/tests_local/testdir´o.lower.table('t').sort(2,-1).columns(2,1).print

command_result_error.jmo

Try
	´test -d /tmp´.print
	´test -f /tmp/foo987654.bak´.print
	
	"test -d /tmp".cmd.print
	"test -f /tmp/foo987654.bak".cmd.print
	
	"test -d /tmp".cmd.live.print
	"test -f /tmp/foo987654.bak".cmd.live.print
	
	"test -d /tmp".cmd.exec.print
	"test -f /tmp/foo987654.bak".cmd.exec.print

.catch.print

command_wait.jmo

Cmd("exit 3").wait.print

comment-prio.jmo

1.print #2.print
3.print #

comment-prio_2.jmo

1.print
 6.print
7.print

comment-prio_break1.jmo

1.print
#####

comment-prio_break2.jmo

1.print
#

comment-prio_break3.jmo

1.print
/*

comment.jmo


1.print#blabla
2.print #blabla
3.print		# b;l'"abla

comment_2.jmo

a="foo".print #.replace('\t','|')

"bla".print
	

"end".print

comment_block.jmo

"1".7.print
"5".print

comment_book.jmo

# Dies ist eine Notiz
5.print  # Dies hier wird ebenso ignoriert

1.print
2.print  3.print

"Du kommst nicht vorbei!".print

compare.jmo

>lazyErrors

Print 123.compare( 321 )
123.compare( 321 ).print
Print "abcdef".compare("abcd")
Print "abcd".compare("abcdef")

Print '-'*40

::test( a, b )
	"{5} < -- > {5} = ".fill(a, b).echo
	Try
		a.compare(b).print
	.catch.message.print

l = [true, false, 5b, 123s, 4567, 'c', "abc", "def"]

°test( l.each..., l.each... )

condition.jmo

true.use(1, 2).print
(true!).use(3, 4).print
false.use(5, 6).print
(true == true).use(7, 8).print
(true != true).use(9, 10).print
(5==5).use(11, 12).print

true.use(13.print, 14.print).print

true.use(15, 16)
## No Block allowed

false.use(17, 18)
## No Block allowed

true.use(19, 20)
## No Block allowed

	
false.use(21, 22)
## No Block allowed

	
true.use(23.print, 24.print)

Use(true, 25, 26).print

Use(true, 27, 28).get.print
	
Use(false, 29, 30).get.print

condition_shortcut.jmo

(true ).use( 1.print,  2.print)
(true ).use( 3.print,  4.print)
(true ).use( 5.print,  6.print).print
(true!).use( 7.print,  8.print)
(true!).use( 9.print, 10.print)
(true!).use(11.print, 12.print).print

('-'*10).print

Use(true ,  1.print,  2.print)
Use(true ,  3.print,  4.print).get
Use(true ,  5.print,  6.print).get.print
Use(true!,  7.print,  8.print)
Use(true!,  9.print, 10.print).get
Use(true!, 11.print, 12.print).get.print

const_args.jmo

__ARGS
app.args

__ARGS.type.print
app.args.type.print

__ARGS.length.print
app.args.length.print

# ARGS.length.print;ARGS.get(1).print", "Buh"

const_args.jmo

# Needs 1 Argument!

app.args.length.print
app.args.get(1).print

const_self.jmo

PI=3.14
PI.print

const_types.jmo

# Regular integer upgrade
Byte B1 = 1b
Short S1 = 2b
Int I1 = 3b
Long L1 = 4b
BigInt A1 = 5b
Dec C1 = 9b
Float F1 = 6b
Double D1 = 7b
BigDec Z1 = 8b
[B1,S1,I1,L1,A1,C1,F1,D1,Z1].map(each.toIdent).implode(", ").print

# Convert float
Byte B2 ~= 1.1f
Short S2 ~= 2.2f
Int I2 ~= 3.3f
Long L2 ~= 4.4f
BigInt A2 ~= 5.5f
Float F2 ~= 6.6f
Double D2 ~= 7.7f
BigDec Z2 ~= 8.8f
[B2,S2,I2,L2,A2,F2,D2,Z2].map(each.toIdent).implode(", ").print

const_with_type.jmo

Int I = 5
I.print
I.type.print

"---".print

Object O = 'a'
O.type.print
O.print

"---".print

Try
	Int J = 'a'
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Try
	Hugo H = "hugo"
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Try
	Fred F? = nil
	F?.print
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

::Gustav

Gustav G? = Gustav
G?.print

continue_break_return.jmo

app.print

('='*10).add(" A 1").print

2.times
	"a".print
	(true)
		"b".print
		loop.next
		"c".print
	"d---".print

('='*5).add(" A 2").print

2.times
	"a".print
	(true)
		"b".print
		Next
		"c".print
	"d---".print

('='*5).add(" A 3").print

2.times
	"a".print
	(true)
		"b".print
		loop.next
		"c".print
	"d---".print

('='*5).add(" A 4").print

2.times
	"a".print
	(true)
		"b".print
		loop.next# >>
		"c".print
	"d---".print

('='*10).add(" B 1").print #------------------------------

2.times
	"a".print
	(true)
		"b".print
		loop.break
		"c".print
	"d---".print

('='*5).add(" B 2").print

2.times
	"a".print
	(true)
		"b".print
		Break
		"c".print
	"d---".print

('='*5).add(" B 3").print

2.times
	"a".print
	(true)
		"b".print
		loop.break
		"c".print
	"d---".print

('='*10).add(" C 1").print #------------------------------

::temp1
	§= 4

::temp2
	§return(3)

°temp1.print
this.temp2.print

('='*5).add(" C 2").print #-----

2.times
	"a".print
	(true)
		"b".print
		#§end(4)	### Darf er hier wirklich Root abbrechen? --> Nein
		app.exit(0)
		"c".print
	"d---".print

"DON'T PRINT THIS".print

control_objects_and_functions.jmo

>lazyErrors

For( 3, each <= 7, each++.echo).each.print
"".print

"-----".print

::MyParTest(a, b, c)!!
	::go
		"Go!".print
		
		Try
			"go: {} {} {}".fill(a,b,c).print
		.catch.proc(:err, err.message+" / "+err.detail).print
		
		this._init(3, 'f')
		this._init(2, 'e')
		this._init(1, 'd')

		Try
			this._init(4, 'v')
		.catch.detail.print
		Try
			this._init(2)
		.catch.detail.print
		
		"go: {} {} {}".fill(a,b,c).print
		
	::fu(x,y,z)!!
		"Fu!".print
		
		Try
			"fu: {} {} {}".fill(x,y,z).print
		.catch.proc(:err, err.message+" / "+err.detail).print
		
		func._init(1, 'u')
		func._init(3, 'w')
		func.init(2, 'v')
		
		Try
			func.init(4, 'v')
		.catch.detail.print
		Try
			func.init(2)
		.catch.detail.print
		
		"fu: {} {} {}".fill(x,y,z).print

	Try
		"MyParTest: {} {} {}".fill(a,b,c).print
	.catch.proc(:err, err.message+" / "+err.detail).print

t = MyParTest(each++.print("init t1"), each--.print("init t2"), each.inc(2).print("init t3"))
t.go
"-----".print
t.fu(each--.print("init f1"), each.dec(3).print("init f2"), each.dec(5).print("init f3"))

control_objects_rework.jmo


::MyGo(p1, p2, p3)!! = foo
	::foo()!!
		this._init
		it = p1+p2+p3
		
		# Block & Stream ausführen
		§ = func.push( p1 + p2 + p3 + it )

MyGo(3,5,7).print
"-----".print
MyGo(3,5,7)
	it.print
	it = 9
.print

control_object_1.jmo

::MyTest1()!!
	"a".print

MyTest1
MyTest1.print

('-'*30).print

::MyControl(p1, p2, p3)!!
	"Constructor Init".print
	this._init
	"Constructor Output".print
	p1.print
	p2.print
	p3.print
	
	::foo
		"Function 1 Init".print
		this._init
		"Function 1 Output".print
		p1.print
		p2.print
		p3.print
		
		"Function 2 Init".print
		this._init
		"Function 2 Output".print
		p1.print
		p2.print
		p3.print
		

a = 10
b = 20
c = 30

m = MyControl( (a=++).print, (b=++).print, (c=++).print )
"---".print
m.foo
m.foo

"---".print
a.print
b.print
c.print

control_object_2.jmo

::MyGo(p1, p2, p3)!! = foo
	::foo()!!
		this._init
		it = p1+p2+p3
		
		# Block & Stream ausführen
		§ = func.push( p1 + p2 + p3 + it )

MyGo(3,5,7).print
"-----".print
MyGo(3,5,7)
	it.print
	it = 9
.print

control_object_3.jmo

::MyTest1()!!
	"a".print

MyTest1
MyTest1.print

('-'*30).print

::MyControl(p1, p2, p3)!!
	"Constructor Init".print
	this._init
	"Constructor Output".print
	[p1,p2,p3].print

	::foo
		"Function Init".print
		this._init
		[p1,p2,p3].print

		"Function Init".print
		this._init
		[p1,p2,p3].print

		"Function Init(1)".print
		this._init(1)
		[p1,p2,p3].print

		"Function Init(2)".print
		this._init(2)
		[p1,p2,p3].print

		"Function Init(3)".print
		this._init(3)
		[p1,p2,p3].print

		"Function Init(1)".print
		this._init(1)
		[p1,p2,p3].print

a = 10
b = 20
c = 30

m = MyControl( (a=++).print, (b=++).print, (c=++).print )
"---".print
m.foo
"---".print
m.foo

"----------".print
a.print
b.print
c.print

control_object_mywhile.jmo

c = 0
b = true
While( b )
	it.print
	c=++
	If( c == 5 )
		b = false

"-----".print

::MyWhile( Bool test )!! =each

	::each()!!
		this._init
		it = test
		While( test )
			it = func.push( it )
			this._init
		§ = it

#####################################

c = 0
b = true
MyWhile( b ).each
	it.print
	c=++
	If( c == 5 )
		b = false

"-----".print

c = 0
b = true
MyWhile( b )
	it.print
	c=++
	If( c == 5 )
		b = false

countChars.jmo

::countChars(Str s2, Char c)
	result = 0
	s2.each.equals(c).if
		result=++
	§ = result

s = "abcabcabc"
°countChars(s, 'a').print

"-----".print

s.count('a').print
s.reduce(0, :a, a[1] + a[2].equals('a').use(1, 0)).print
s.amount( each == 'a' ).print

"-----".print

s.chars.count('a').print
s.chars.reduce(0, :a, a[1] + a[2].equals('a').use(1, 0)).print
s.chars.amount( each == 'a').print

"======================".print

s = "wlwkerjiuvmnweriweriuw"
°countChars(s, 'w').print

"-----".print

s.count('w').print
s.reduce(0, :a, a[1] + a[2].equals('w').use(1, 0)).print
s.amount( each == 'w' ).print

"-----".print

s.chars.count('w').print
s.chars.reduce(0, :a, a[1] + a[2].equals('w').use(1, 0)).print
s.chars.amount( each == 'w').print

counter_1.jmo

### Einfach
{1,5}.print
{1,5}
	it.print
{1,5}.print
{2,8}.print

{3,7,2}.print
Count(2,6).toList.set(9,4).add(1).sort.reverse.each.print

### Downto
{8,2}.print

### Stepping
{1,10,3}.print
{10,1,-2}.print

('-'*30).print

### Variablen
a=1
b=10
c=2
{a,b,c}
	a=a+1
	b=b+1
	c=c+1
	it.print

counter_2.jmo

# Mit Char
{'a', 'z'}.echo;"".print
{'a', 'z', 3}.echo;"".print

# Mit Bool
{false, true}.print
{true, false}.print

# Mit Dezimalen
{1.23, 6}.print
{1.23, 6, 2}.print
{1.23, 5.67, 0.78}.print

# mit variable
a=5
{a, 9}.print

# Mit einem Argument
d=true
While(d)
	d.print
	d=false
	

# als while
b=true
c=1
While(b)
	it.echo
	(c>=9).if
		b=false
	c.print
	c=c+1

counter_3.jmo

Count('a','z').toList.each.echo;"".print

{('a'..'z').toList.get(5), 'n'.print(':'),2+1}.echo;"".print

{2, 10, 2}.print

counter_4.jmo

{3}
	it.print
"----------".print

3
	it.print
"----------".print

3.times
	it.print
"----------".print

3..9
	it.print
	it.print
"----------".print

{3,9}
	it.print
"----------".print

°.print
°print

counter_5.jmo

{3}
	it.print
"-----".print
3
	it.print
"-----".print
3.times
	it.print
"-----".print
3..9
	it.print
"-----".print
(3..9).each => x
	x.print
"-----".print

Count(3,9,2)
	it.print
"-----".print
°.print
°print
"-----".print
3.each
	it.print
"-----".print
[4,6,8,2,3]
	it.print

"-----".print
5 % 3 => a
a.print

a = 5 % 3
a.print

4.print(5 % 3)
4.print(it.print)

3.4456.print

"-----".print

a = 3
a..9
	it.print

"------------------".print
7..9 => xy
	a1 = it
	4..2 => ab
		a2 = it
		"{} {} {} {}".fill(xy,ab,a1,a2).print
"------------------".print
{7..9} => yz
	a1 = it
	{4..2} => ab
		a2 = it
		"{} {} {} {}".fill(yz,ab,a1,a2).print

counter_let.jmo

3.times => u #(:u)
	it.print
	u.print

3.times #(7)
	it = 7
	it.print

3.times()
	it.print

##########################################################
('-'*30).print

{0,100,50}.mem(:x).pass
	x.print
	Count(2,10,8).each => y  #(:y)
		("Ergibt: "+x+"/"+y).print

v=true
While(v).each => h #(:h)
	h.print
	v=false

{1.2, 3.4, 0.6} => k
	k.print
	
Count(10, 1, -2).each => q #(:q)
	q.print
Count(10, 19, 2).each => q #(:q)
	q.print

°try
	Count(10, 1, 2).each
		it.print
.catch.detail.print
		
°try
	Count(10, 19, -2).each
		it.print
.catch.detail.print

°try
	Count(10.1, 1.2, 2.3).each
		it.print
.catch.detail.print
		
°try
	Count(10.1, 19.2, -2.3).each
		it.print
.catch.detail.print

counter_let2.jmo

3.times => u #(:u)
	u.print

# So:

{0,100,15} => x
	x.print
	{0,100,12} => y
		("Ergibt: "+x+"/"+y).print

counter_range.jmo

::line
	('-'*10).print

{1,4}.print
°line
{2,5}.print
°line

{3..15,4}.print
°line

r= 4..9

{r}.print
°line
{r, 2}.print
°line

Count(r).each.print
°line
Count(r, 2).each.print
°line

csv2.jmo

Csv('\t').read("data/data.csv").print
Csv('\t').read("./data/data.csv").print

cur_math.jmo

Print 3 + cur * 5
Print 2 + cur + 8
Print 2 * cur + 8
Print 2 * (cur + 8)

cycle_1.jmo

c = Cycle
c.start( 50 )

counter = 0

::run(x)
	c = x
	counter =++
	( counter <= 3 )
		"Run ".add(c).print

c::@cycle
	this.run(it)

this._sleep( 200 )
"Main end".print

cycle_1b.jmo

counter = 0

::_foo
	counter=++
	If(counter <= 2)
		"cycle ".add(counter).print

Cycle.start( 25 )::@cycle
	this._foo

this._sleep( 100 )
"Main end".print

cycle_2.jmo

C = Cycle
C.start( 10 )

counter = [0]

C::@cycle
	%.print
	counter[1] = counter[1] ++
	"Event start".print
	#func.print
	"Event end".print
	(counter[1] == 2)
		C.stop

this._sleep(100)
"Main end".print

cycle_2b.jmo

C = Cycle
C.start( 25 )

COUNTER = [ 0 ]

C::@cycle
	%.print
	COUNTER[1] = COUNTER[1] ++
	"Event start".print
	#func.print
	"Event end".print
	(COUNTER[1] == 2)
		C.stop
		app.exit

app.keep
"Main end".print

date.jmo

d1=Date(2019,3,5)
d2=Date("2017-02-27")
d3=Date("02.04.2022")
d4=Date("2019-03-05")

d1.year.print
d1.month.print
d1.day.print

d2.diffDays(d3).print
d2.diffMonths(d3).print
d2.diffYears(d3).print

(d1==d4).print
(d1==d2).print
(d1!=d4).print
(d1!=d2).print
(d1>d4).print
(d1>d2).print
(d1>=d4).print
(d1>=d2).print
(d1<d4).print
(d1<d2).print
(d1<=d4).print
(d1<=d2).print

d1.print
d1.toStr.print

d1.style("YYYY-MM-DD").print
d1.style("YY/M/D").print
d1.style("D.M.Y").print
d1.style("DD.MM.YYYY").print
d1.style("MM/DD/YYYY").print

datetime.jmo

::test(DateTime tx)
	"--- {} ---".fill(tx.styleDE).print
	tx.print
	tx.year.print
	tx.month.print
	tx.day.print
	tx.hour.print
	tx.min.print
	tx.sec.print
	tx.style("YYYY-MM-DD hh.mm.ss").print

°test( DateTime(2019,11,7,23,45,12) )
°test( DateTime("2019-11-07 07:13:54") )

"----------".print
t = DateTime
(t.hours < 24 && t.year > 2000)
	"ok".print

"----------".print

t1 = DateTime(2016,7,8, 6, 45, 8)
t2 = DateTime(2019,11,7, 9, 13, 21)

t1.diffSeconds(t2).print
t1.diffMinutes(t2).print
t1.diffHours(t2).print
t1.diffDays(t2).print

t2.diffSeconds(t1).print
t2.diffMinutes(t1).print
t2.diffHours(t1).print
t2.diffDays(t1).print

t1.toStr.print
t2.toStr.print

(t1 == t2).print
(t1 != t2).print
(t1 > t2).print
(t1 >= t2).print
(t1 < t2).print
(t1 <= t2).print

datetime_2020-01-20.jmo

a=DateTime("2000-01-02 12:34:56")
a.print

a.add(5).print
a.addSec(6).print
a.addSeconds(7).print

a.addMin(6).print
a.addMinutes(7).print

a.addHour(6).print
a.addHours(7).print

a.addDay(6).print
a.addDays(7).print

a.addMonth(6).print
a.addMonths(7).print

a.addYear(6).print
a.addYears(7).print

a.sub(5).print
a.subSec(6).print
a.subSeconds(7).print

"---".print

a.print
a.addHours(12).print

"---".print

b = DateTime("2020-01-20 12:34:56")
b.print
b=b+2
b.print
b=b-2
b.print
b+=4
b.print
b-=2
b.print

"------ Inc Dec".print

a=DateTime("2000-01-02 12:34:56")
a.print

a=++
a.print
a.inc.print
a.print

"---".print

a=--
a.print
a.dec.print
a.print

"---".print

a++=3
a.print
a.inc(3).print
a--=3
a.print
a.dec(3).print

"------ Limit".print

l=DateTime("2000-01-02 12:34:56")
l.limit( DateTime("2000-01-02 13:34:45"), DateTime("2000-01-02 21:32:43")).print
l.limit( DateTime("2000-01-02 10:11:12"), DateTime("2000-01-02 21:32:43")).print
l.limit( DateTime("2000-01-02 10:11:12"), DateTime("2000-01-02 11:12:13")).print

datetime_2021-01-12.jmo

d = Date(2001,11,17)
d.dayOfWeek.print
d.dayOfWeek.print
d.weekDay.print

"-----------".print
Date(2021,1,09).dayOfWeek.print
Date(2021,1,10).dayOfWeek.print
Date(2021,1,11).dayOfWeek.print
Date(2021,1,12).dayOfWeek.print

"-----------".print
DateTime(2021,1,09,12,13,14).dayOfWeek.print
DateTime(2021,1,10,12,13,14).dayOfWeek.print
DateTime(2021,1,11,12,13,14).weekDay.print
DateTime(2021,1,12,12,13,14).weekDay.print

datetime_country.jmo

::show(dt)
	"-----".print
	dt.print
	dt.styleDE.print
	dt.styleEN.print
	dt.styleUS.print
	

d1 = Date(2020,8,25)
d2 = Date(2020,12,6)
d3 = Date(1998,3,4)

°show( d1 )
°show( d2 )
°show( d3 )

t1 = Time(0,1,2)
t2 = Time(5,12,34)
t3 = Time(12,34,56)
t4 = Time(23,45,56)

°show( t1 )
°show( t2 )
°show( t3 )
°show( t4 )

dt1 = d1.combine( t1 )
dt2 = d2.combine( t2 )
dt3 = d3.combine( t3 )
dt4 = d3.combine( t4 )

°show( dt1 )
°show( dt2 )
°show( dt3 )
°show( dt4 )

datetime_format.jmo

::test(d)
	("========== " + d.styleDE).print
	
	d.style("werDD.MM.YYYYasdf").print
	d.style("123DD.MM.YYYY321").print
	d.style("dd.mm.YYh<>~hs").print
	d.style("-\\DD+MM_YY#YY").print
	d.style("YYYYYYYYYYY").print

	"---".print

	d.style("~DD.MM.~Y~YYY").print
	d.style("#D~ies ^D ~M /YY @YY ~YY").print

	"---".print

	d.style("Yuhuuu!!! Dieser Monat ist toll!").print
	d.style("~Yuhuuu!!! ~Dieser ~Monat ist toll!").print
	d.style("~Yu~huuu!!! ~D~ie~ser ~Monat ~i~st toll!").print

	"---".print
	
	d.style("dmyDMYhsHS").print
	

°test( Date(2020,1,3) )
°test( Date(2000,1,1) )
°test( Time(11,22,33) )
°test( Time(1,2,3) )
°test( DateTime(2010,4,5,11,22,33) )

datetime_set.jmo

d = Date(2020,3,4)
d.print
d.setYear(2033).print
d.setMonth(9).print
d.setDay(1).print
d.print

t = Time(11,22,33)
t.print
t.setHour(4).print
t.setMinute(5).print
t.setSecond(6).print
t.print

dt = DateTime(2020,3,4,11,22,33)
dt.print
dt.setYear(2033).print
dt.setMonth(8).print
dt.setDay(5).print
dt.setHour(4).print
dt.setMinute(3).print
dt.setSecond(2).print
dt.print

date_2020-01-20.jmo

a=Date("2020-01-20")
a.print

"---".print

a=++
a.print
a.inc.print
a.print

"---".print

a=--
a.print
a.dec.print
a.print

"---".print

a++=3
a.print
a.inc(3).print
a--=3
a.print
a.dec(3).print

"------".print

l=Date("2020-01-20")
l.limit( Date("2020-01-28"), Date("2020-02-28")).print
l.limit( Date("2020-01-01"), Date("2020-02-28")).print
l.limit( Date("2020-01-01"), Date("2020-01-18")).print

"------".print

b = Date("2020-01-01")
b.print
b=b+2
b.print
b=b-2
b.print
b+=4
b.print
b-=2
b.print

date_2020-02-10.jmo

d = Date(2020,02,10)
d.print

"---".print

d+=2
d.print
d=d+5
d.print
d.add(2)
d.print
d=d.add(1)
d.print

"---".print

d-=2
d.print
d=d-5
d.print
d.sub(2)
d.print
d=d.sub(1)
d.print

"---".print

d=d.subMonths(2)
d.print
d=d.subMonths(2)
d.print
d=d.subYears(2)
d.print
d=d.subYears(2)
d.print

date_2020-10-15.jmo

d = Date("2020-10-15")
d.addMonth(2).print
d.subMonth(4).print
d.addYear(1).print
d.subYear(2).print
d.addDay(5).print
d.subDay(2).print

(Date(2020,10,10) - 3).print

date_add.jmo

Date(2019,12,1).add(5).print

a=Date(2019,12,1)
a.print
a.addDays(40).print
a.print
a.addMonths(2).print
a.addYears(2).print

a.addDays(-15).print
a.addMonths(-2).print
a.addYears(-2).print

date_country.jmo

d = Date(2020,8,25)
d.print
d.toStr.print

d.style("YY-MM").print
d.style("DD.MM.").print

d.styleDE.print
d.styleDE.print
d.styleEN.print
d.styleEN.print
d.styleUS.print
d.styleUS.print

date_time_combine.jmo

>lazyErrors

D = Date(2021,3,5)
T = Time(11,22,33)
DT = DateTime(D,T)

##############################

::test( a, b )
	Try
		a.add(b).print
	.catch.info.print

this.test( D, T )
this.test( T, D )
this.test( D, DT )
this.test( T, DT )
this.test( DT, D )
this.test( DT, T )

Print "--------------------"

D.combine(T).print
T.combine(D).print

date_time_constructors.jmo

::Foo(Atomic a? = nil)
	Int value = 0

	(a == nil)
		value = 123
	.else( a.type == <Str> )
		value = a.before('-').toInt*60 + a.after('-').toInt
	.else( a.isType( <IntNumber> ) )
		value = a.toInt
	.else( a.isType( <DecNumber> ) )
		value = a.mul(60).toInt
	.else
		Error("Invalid argument", "Got: "+a).throw

	::get = value

####################################

Foo.get.print
Foo[].print
Foo.get().print
Print "---"

Foo().get.print
Foo(nil).get.print
Foo("12-34").get.print
Foo(345).get.print
Foo(12.5).get.print
Print "---"

Try
	Foo( true ).get.print
.catch.info.print

####################################
Print '-'*30

e1 = DateTime( 2034,5,6,12,34,56,789 )
Ident e1
Ident e1.toStr
e2 = DateTime( e1.toStr )
Ident e2.toStr
Ident e2

Print "-"

e1 = DateTime( 2034,5,6,12,34,56,789 )
Ident e1
Ident e1.toStrFull
e2 = DateTime( e1.toStrFull )
Ident e2.toStrFull
Ident e2

Print "-"

e1 = DateTime( 2034,5,6,12,34,56,789 )
Ident e1
Ident e1.toMilliSeconds
e2 = DateTime( e1.toMilliSeconds )
Ident e2.toMSec
Ident e2

####################################
Print '-'*30

t1 = Time( 12,34,56,789 )
Ident t1 + 1.5
Ident t1 - 1.5

d1 = Date( 2034,5,6 )
Ident d1 + 1.5
Ident d1 - 1.5

e1 = DateTime( 2034,5,6,12,34,56,789 )
Ident e1 + 1.5
Ident e1 - 1.5

date_time_diff.jmo

::test(y, z, Str info)
	info.begin("--- ").print

	y.isLess(z).print
	(y<z).print

	y.isGreater(z).print
	(y>z).print

	y.isLessOrEqual(z).print
	(y<=z).print

	y.isGreaterOrEqual(z).print
	(y>=z).print

	y.isEqual(z).print
	y.equals(z).print
	(y==z).print

	y.isEqual(z).not.print
	y.differs(z).print
	(y!=z).print
	(y<>z).print

a=Date("2020-01-01")
b=Date("2019-12-03")
°test(a, b, "Date")

c=Time("12:34:56")
d=Time("11:22:33")
°test(c, d, "Time")

e=DateTime("2020-01-01 12:34:56")
f=DateTime("2019-12-03 11:22:33")
°test(e, f, "DateTime")

date_time_sub.jmo

Date(2020,1,22).diff( Date(2020,2,25) ).print
Date(2020,2,25).diff( Date(2020,1,22) ).print
(Date(2020,2,25)-4).print

"---".print

( Time(11,22,33).subTime( Time(6,7,8) ) ).print
( Time(11,22,33).diff( Time(6,7,8) ) ).print
( Time(6,7,8).subTime( Time(11,22,33) ) ).print
( Time(6,7,8).diff( Time(11,22,33) ) ).print
(Time(11,22,33)-4).print

"---".print

DateTime(2020,1,22,6,7,8).diff( DateTime(2020,2,25,11,22,33) ).print
(DateTime(2020,1,22,6,7,8) + 34.219039352).print
DateTime(2020,2,25,11,22,33).diff( DateTime(2020,1,22,6,7,8) ).print
DateTime(2020,2,25,11,22,33).subTime( Time(6,7,8) ).print
(DateTime(2020,2,25,11,22,33)-0.000046296).print

date_time_subadd.jmo

DT1 = DateTime(2020,2,25,11,22,33)
DT2 = DateTime(2020,1,22,6,7,8)

D1 = Date(2020,2,25)
D2 = Date(2020,1,22)

T1 = Time(11,22,33)
T2 = Time(6,7,8)
T3 = Time(23,14,59)

I1 = 4
I2 = 40

#########################################

::add(a1, a2)
	("--> "+a1+" + "+a2).print
	Try
		(a1 + a2).print
	.catch.message.print
	
::sub(a1, a2)
	("--> "+a1+" - "+a2).print
	Try
		(a1 - a2).print
	.catch.message.print
	
#########################################

l = [DT1, DT2, D1, D2, T1, T2, T3, I1, I2]

l.each
	X1 = it
	l.each
		X2 = it
		°add(X1, X2)

('-'*60).print

l.each
	X1 = it
	l.each
		X2 = it
		°sub(X1, X2)

date_time_tostring.jmo

tab = Table(4)

::test(dt)
	tab.add( dt.toStr, dt.toStrFull, dt.toIdent, dt.toDescribe )

[
	Time(12,34,56),
	Time(12,34,56,789),
	Time(12,34,56,0),
	Time(12,34,56,1),

	Date(1990,3,4),
	Date(2022,11,24),

	DateTime(2021,3,4,12,34,56),
	DateTime(2021,3,4,12,34,56,789),
	DateTime(2021,3,4,12,34,56,0),
	DateTime(2021,3,4,12,34,56,1)
].each
	°test it

tab.setTitles( "toStr","toStrFull","toIdent","toDescribe" )
tab.print

debug_1.jmo

5.debug
"abc".debug.print.echo.debug
't'.debug(1,5.4,'o',"lkj")
"end".debug.print

debug_2.jmo

>debug

1.debug
2.debug.print

dec.jmo

2.345.print

2.345d.print
2.345.print.print
2.345f.print
2.345c.print

dec_2.jmo

(85*0.9).print
(85*0.print).print
(85*1.print).print
(85*1.2).print

dec_3.jmo

(4*65+6*58.5).print		# 611.0

dec_4.jmo

(84.4-73.7).print

"12,34".toDec.print

dec_5.jmo

d = 123.1234567891
d.print
d = 123.12345678912
d.print
d = 123.12345678999
d.print

d = 123.12345678
d.decimals.print
d.decimal.print
d = -123.12345678
d.decimals.print
d.decimal.print

dec_6.jmo

Describe 12b.toDec
Describe 1234s.toDec
Describe 123456.toDec
Describe 12345678l.toDec
Describe 1234.5678f.toDec
Describe 12345678.9012345d.toDec
Describe "123.456".toDec

Print

d1 = 6.5c
d2 = 4.7c

Describe d1
Describe d1.abs()
Describe d1.inc()
Describe d1.dec()
Describe d1.log10()
Describe d1.ln()
Describe d1.neg()
Describe d1.pow()
Describe d1.root()

Print

Describe d1.toByte
Describe d1.toShort
Describe d1.toInt
Describe d1.toLong
Describe d1.toFloat
Describe d1.toDouble
Describe d1.toStr

Print

Describe d1.add(d2)
Describe d1.sub(d2)
Describe d1.mul(d2)
Describe d1.div(d2)
Describe d1.mod(d2)
Describe d1.log(d2)
Describe d1.pow(d2)
Describe d1.root(d2)

dec_7.jmo

Describe 1c / 3
Describe 1d / 3
Describe 3c * 1 / 3
Describe 3d * 1 / 3
Describe 4.5c * 6.7
Describe 4.5d * 6.7
Describe 5000000000c
Describe 5000000000d
Describe 0.7c + 0.1
Describe 0.7d + 0.1
Describe 0.9c - 0.1
Describe 0.9d - 0.1

Print

Describe 0.7c + 0.1c
Describe 0.7f + 0.1f
Describe 0.7d + 0.1d
Describe 362.2c - 362.6c
Describe 362.2f - 362.6f
Describe 362.2d - 362.6d
Describe 1.0c - 9c * 0.10c
Describe 1.0f - 9f * 0.10f
Describe 1.0d - 9d * 0.10d
Describe 0.0175c * 100000
Describe 0.0175f * 100000
Describe 0.0175d * 100000
Describe 2.9876543218c
Describe 2.9876543218f
Describe 2.9876543218d
Describe 0.9c - 0.1c
Describe 0.9f - 0.1f
Describe 0.9d - 0.1d
Describe 4.5c ** 8
Describe 4.5f ** 8
Describe 4.5d ** 8
Describe 1c / 3
Describe 1f / 3
Describe 1d / 3

Print

Describe 4.5c * 4.5 * 4.5 * 4.5 * 4.5 * 4.5 * 4.5 * 4.5
Describe 4.5d * 4.5 * 4.5 * 4.5 * 4.5 * 4.5 * 4.5 * 4.5
Describe 1c / 4.5
Describe 1d / 4.5
Describe 1c / 6.7
Describe 1d / 6.7
Describe 2c / 3
Describe 2d / 3
Describe 2 / 4.5c
Describe 2 / 4.5d
Describe 2**4.5c
Describe 2**4.5d
Describe 2 / 6.7c
Describe 2 / 6.7d
Describe 2**6.7c
Describe 2**6.7d

Print

Describe 3c / 1
Describe 3d / 1
Describe 3c / 6.7
Describe 3d / 6.7
Describe 8c - 6.7
Describe 8d - 6.7
Describe 8c % 6.7
Describe 8d % 6.7
Describe 6.7c % 1
Describe 6.7d % 1
Describe 6.7c % 2
Describe 6.7d % 2

Print

Describe 6.7 / 1
Describe 6.7 * 6.7 * 6.7
Describe 6.7 - 8
Describe 6.7 - 8.0
Describe 6.7 * 4.5
Describe -1c / -3
Describe -1c / -4.5
Describe -2c / -3
Describe -2c / -4.5
Describe -3c / -4.5

Print

Describe -3c / -6.7
Describe -8c / -3
Describe -8c / -4.5
Describe -8c - -6.7
Describe -8c / -6.7
Describe -8c % -6.7
Describe -4.5 * -6.7
Describe -6.7 % -1
Describe -6.7 % -2
Describe -6.7 / -3

Print

Describe -6.7 % -3
Describe -6.7 - -8
Describe -6.7 * -4.5

dec_math.jmo

1.3.cos.print
1.3.sin.print
1.3.tan.print
0.3.acos.print
0.3.asin.print
0.3.atan.print

[4,5,1,9,2,2,6,4,3].average.print
[4,5,1,9,2,2,6,4,3].sum.print

5.limit(3,7).type.print
5.limit(3,7).print
0.limit(3,7).print
9.limit(3,7).print

5.limit(3.2,7.9).type.print
5.limit(3.2,7.9).print
0.limit(3.2,7.9).print
9.limit(3.2,7.9).print

5.2f.limit(3,7).type.print
5.2f.limit(3,7).print
0.1f.limit(3,7).print
9.3f.limit(3,7).print

5.2.limit(3,7).type.print
5.2.limit(3,7).print
0.1.limit(3,7).print
9.3.limit(3,7).print

123.checksum.print

dec_precision_limit.jmo



( 362.2 - 362.6 ).print
( 362.2c - 362.6c ).print
( 362.2d - 362.6d ).print
( 362.2f - 362.6f ).print

('-'*20).print ##################################

[0.7 + 0.1, 0.9-0.1, 0.7 + 0.1 == 0.9-0.1].print
[0.7c + 0.1c, 0.9c-0.1c, 0.7c + 0.1c == 0.9c-0.1c].print
[0.7d + 0.1d, 0.9d-0.1d, 0.7d + 0.1d == 0.9d-0.1d].print
[0.7f + 0.1f, 0.9f-0.1f, 0.7f + 0.1f == 0.9f-0.1f].print

('-'*20).print ##################################

(1.0  - (9  * 0.10  )).print
(1.0c - (9c * 0.10c )).print
(1.0d - (9d * 0.10d )).print
(1.0f - (9f * 0.10f )).print

('-'*20).print ##################################

Dec total = 0.2
Count(100)
	total += 0.2

("double total = " + total).print
('-'*20).print ##################################
Object floatTotal? = 0.2f
Count(100)
	floatTotal += 0.2f
("float Total = " + floatTotal).print
('-'*20).print ##################################
("Sum of 10 (0.1 ) = " + (0.1  + 0.1  + 0.1  + 0.1  + 0.1  + 0.1  + 0.1  + 0.1  + 0.1  + 0.1 )).print
("Sum of 10 (0.1c) = " + (0.1c + 0.1c + 0.1c + 0.1c + 0.1c + 0.1c + 0.1c + 0.1c + 0.1c + 0.1c)).print
("Sum of 10 (0.1d) = " + (0.1d + 0.1d + 0.1d + 0.1d + 0.1d + 0.1d + 0.1d + 0.1d + 0.1d + 0.1d)).print
("Sum of 10 (0.1f) = " + (0.1f + 0.1f + 0.1f + 0.1f + 0.1f + 0.1f + 0.1f + 0.1f + 0.1f + 0.1f)).print
('-'*20).print ##################################
("Sum of 10 (0.01 ) = " + (0.01  + 0.01  + 0.01  + 0.01  + 0.01  + 0.01  + 0.01  + 0.01  + 0.01  + 0.01 )).print
("Sum of 10 (0.01c) = " + (0.01c + 0.01c + 0.01c + 0.01c + 0.01c + 0.01c + 0.01c + 0.01c + 0.01c + 0.01c)).print
("Sum of 10 (0.01d) = " + (0.01d + 0.01d + 0.01d + 0.01d + 0.01d + 0.01d + 0.01d + 0.01d + 0.01d + 0.01d)).print
("Sum of 10 (0.01f) = " + (0.01f + 0.01f + 0.01f + 0.01f + 0.01f + 0.01f + 0.01f + 0.01f + 0.01f + 0.01f)).print
('-'*20).print ##################################
("Sum of 10 (0.0001 ) = " + (0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001  + 0.0001 )).print
("Sum of 10 (0.0001c) = " + (0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c + 0.0001c)).print
("Sum of 10 (0.0001d) = " + (0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d + 0.0001d)).print
("Sum of 10 (0.0001f) = " + (0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f + 0.0001f)).print
('-'*20).print ##################################
("Precision of dec 2.9876543218c : " + 2.9876543218c).print
("Precision of float 2.9876543218f : " + 2.9876543218f).print
("Precision of double 2.9876543218d : " + 2.9876543218d).print
('-'*20).print ##################################
("0.0175  * 100000 = " + 0.0175  * 100000).print
("0.0175c * 100000 = " + 0.0175c * 100000).print
("0.0175d * 100000 = " + 0.0175d * 100000).print
("0.0175f * 100000 = " + 0.0175f * 100000).print

deepGetSetPullPut.jmo

l=[[[1,2],[2,2],[3,2]],[[2,2],[2,2],[3,2]],[[3,2],[2,2],[3,2]],[[4,2],[2,2],[3,2]],[[5,2],[2,2],[3,2]]]
l.print

l.get(4,2,1).print
l.get([5,3,1].toTempLet).print

Try
	l.get(5,3,9).print
.catch

	it.detail.print

"---".print

l[ 4,2,1 ].print
l[ 5,3,1 ].print

Try
	l[5,3,9].print
.catch

	it.detail.print

"----------".print

l.pull(4,2,1).print
l.pull(5,3,1).print
l.pull(5,3,9).print

"---".print

l[ 4,2,1 ]?.print
l[ 5,3,1 ]?.print
l[ 5,3,9 ]?.print

"----------".print
l.print
"----------".print

l.set(9, [4,2,1].toTempLet).print
l.set(8, [5,3,1].toTempLet).print
Try
	l.set(7, [5,3,9].toTempLet).print
.catch
	it.detail.print

"---".print

l[ 4,2,1 ] = 6
l.print
l[ 5,3,1 ] = 5
l.print
Try
	l[ 5,3,9 ] = 4
.catch
	it.detail.print

"----------".print

l.put(9, 4,2,1).print

l.put(8, [5,3,1].toTempLet).print
l.put(7, [5,3,7].toTempLet).print

"---".print

l[ 4,2,1 ]? = 6
l.print
l[ 5,3,1 ]? = 5
l.print
l[ 1,2,3 ]? = 4
l.print

default_value_1.jmo

::Foo( Int a = 3*4, Str b = 5*'+', l = [].init(7,false).add(3), c = Count(5) )
	Print "--- Constructor ---"
	Print a
	Print b
	Print l
	Print c
	
	::bar( Int aa = 3*4, Str bb = 5*'+', ll = [].init(7,false).add(3), cc = Count(5) )
		Print "--- Function ---"
		Print aa
		Print bb
		Print ll
		Print cc

Foo.bar
Print 60*'#'
Foo(3, "uu").bar(9+9, "oo" )

direct_get.jmo

"--- Map ---".print

m = Map
m.add( "foo", 3 )
m.add( "bla", 9 )
m.add( "ack", 4 )
m.print

m$bla.print
m$foo=9
m$ack = 2
m.print

"--- List ---".print

l = [9,8,7,6]

l$4.print
l$3=1
l$1 = 2
l.print

"--- Cmd ---".print

cmd = Cmd("echo 5")
cmd.buffer.out.print

dir_add.jmo

# Local test

a = Sys.home.print.dir("git").dir("jaymo")  # + "/git/jaymo"
Print a
Print a.type

Print '-' * 40

a = Sys.home.print.dirMust("git").dirMay("jaymo")  #.add("/git/jaymo")
Print a
Print a.type

dir_delete.jmo

d = Dir("/tmp/foo")
d.make

d.makeDir("def")
d.delete.print
d.deleteDir("def").print
d.deleteDir("xyz").print
d.deleteFile("abc.txt").print
d.delete.print

division.jmo

(69/25).print
(69.9/25).print
(10/3).print
(3*(1/3)).print
(10/5).print
# (69/25).exec.type.print
(69/25).type.print
(69/25).toInt.print
(69/25).abs.print
(69/25).floor.print
(69/25).roof.print
(69/25).roundUp.print
(69/25).roundDown.print
(69/25).round.print
(69/25).roundDec(1).print

division_let.jmo

(25//).print
(25//.round).print

(25/2).print

(25/2).round.print

('-'*30).print

(5/2).print
# (5/2).exec.type.print
(5/2).type.print
b=5/2

a=1
a=4
a=5.2.toInt		# Wirft sonst Fehler!

d=a.toDec
d.print
d/=2
d.print

d=5c
d.print
b.print
d/=b
d.print

('-'*30).print

e=9
(e=//).print
e.print

e=9
(e//).round.print
e.print

e=9
(e/2).print
e.print

e=9
(e/2).round.print
e.print

('-'*30).print

d=9.2
(d=//).print
d.print

d=9.2
(d//.round).print
d.print

d=9.2
(d//.round).print
d.print

d=9.2
(d/2).print
d=9.2
(d/2).round.print

('-'*30).print

d=5.2
(d=**).print

div_2020-02-18.jmo

2.print.times;	5.print

2.print.times
	3.print
	
"---".print

(4-2.1).print
(3/1.5).print
(4%1.4).print
(25//2.1).print
(4&2).print
(4|2).print
(4^2).print

"---".print

(4<<).print
(4>>).print
(8<<).print
(8>>).print

(4<<2).print
(4>>2).print
(8<<2).print
(8>>2).print
(8<<3).print
(8>>3).print

div_2020-04-24.jmo

{3}.print

"---".print

[1,2,3,2,1].copy.print
[1,2,3,2,1].remove(2).print

"---".print

[5].only(4).print

"---".print

{10..1}.print
{10..1, -3}.print
 
"---".print

i=1; b=i=++; b.print; i.print

"---".print

Dir("/home/mike/Prog/JayMo/tests_local/testdir/").list.each.absolute.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").list('*'+"x*").each.absolute.print
"---".print

File("/home/mike/Prog/JayMo/tests_local/testdir/bar.txt").absolute.print
File("/home/mike/Prog/JayMo/tests_local/testdir/foo.txt").absolute.print
a="/home/mike/Prog/JayMo/tests_local/testdir/foo.txt"
File(a).absolute.print
File(a).absolute.print

"---".print

Dir("/home/mike/Prog/JayMo/tests_local/testdir/").files("*.txt").each.absolute.print
Dir("/home/mike/Prog/JayMo/tests_local/testdir/").files("*.txt").each.absolute.print
File(a).absolute.print
File(a).absolute.print

"---".print

Dir("/home/mike/Prog/JayMo/tests_local/testdir").print.type.print

div_lines_2019-10-27.jmo

::line
	('-'*10).print

###########################################################

[3,1,4,2,'5',"6"].min.print
[3,1,4,2,'5',"6"].max.print
°line

9.if(true).print
9.if(cur == 9).print
9.passIs(9).print
9.passIs(9+1).print
9.times.if(cur == 3).print
°line

{20,30}.if(cur % 3 == 0).print
{20,30}.passIf(cur % 3 == 0).print
°line

{2020,2030}.if(cur % 3 == 0).print
{2020,2030}.passIf(cur % 3 == 0).print
°line

3.times.print
"foobar".end(-2).print
Object s?=5; s?='a'; s? = °; s?.print
[1,3,5].clear.add(7).print
Group(true).print
°line

4.print
°.print
a=42; a.print
"abcdefghabcdefgh".split("de").describe
["lkj","sdf"].implode.print
°line

"^[a-z]*$"l.print
RegEx("^[a-z]*$"l).print.match("kjhuouo").print
"a5654654".contains('5').print
°line

Use(4==3+1, 'a', 'b').describe.get.print
Random().print
1..5.print
")abc".replace("^\)[a-zA-Z_]*"l.toRegEx, "").print
°line

°try
	var; var.print
.catch.message.print
°line

4.print(cur.print)
4.print(cur+1)
4.print(cur.toStr+" = Result")
4.print("Result: "+cur)
4.print(cur.mem(:x).proc("Result: "+x))
°line

5.tee(4+cur).print
5.proc(4+cur).print
5.proc(cur+4).print
°line

[].add((5..9).each...).print
[].add((5..9).each*2).print
[].add((5..9).each.mul(2)...).print
°line

['a','c','A','b','C','B'].print.sort.print
["a","c","A","b","C","B"].print.sort.print
°line

a=5; (a>2).if.proc(a.print); #it.print; 'e'.print
°line

("Hallo"-'l'-'H').print
°line

°try
	"w".toDec.print
.catch.detail.print
°try
	"w".toInt.print
.catch.detail.print
°line

a=5;a++.print
5++.print
(23--.print).print
°line

"bla\nfoo".print
"bla\\nfoo".print
°line

6..9.print
°line

("5"+".print").print.jmo.print
"echo 6".cmd.buffer.print
°line

("head(\"" + "Bla,Foo".replace(",", "\", \"") + "\")").print
"Foo,Bak".replace(",", "\", \"").print
°line

a=2;a++.add(4).++.print; a.print
(true! || true).print
°line

(84.4-73.7).print
45.toStr.left(1).add("567").print
°line

Table(2).types.print
a=5;a.types.print;a.print
°line

(['a','c']+'b').sort.reverse.print
a=4+6*2;b=a>3*2+1;c=a+1 > 1 ^^ false ;a.print;b.print;c.print
°line

°type.print
5.type.print
t="lorem"; t[1].caseUp.print; t.print
°line

['a','b','c','d','e'].select(2,5,1).print
°line

h='h'
'c'..h.each.echo; "".print
°line

r = Java("Random"); r.print
r = Java("Random"); r.print; r.nextInt.type.print
r = Java("java.util.Random"); r.print
r = Java("java.util.Random"); r.print; r.nextInt.type.print
°line

do.jmo

5.add(2).mul(3).pass
	it.print
	(it+it).print

blacklist = ["Gu", "Test", "Use"]
name = "FuseTeSter"

blacklist.each.lower.pass
	name.lower.contains(it).print

eachVertical.jmo

x = 'z'..'a'
x.print
x.toList.print
('z'..'a').toList.print
x.toStr.print

a = [1,2,5,6,9,3,4,6,3,2]
b = [1..12]
c = (4..19).toList
d = "abcdefghijklmnopqrstuvw"
e = ('z'..'a').toList
f = "lwkejrwejbrmxcnviusdzf"
g = Count(3,15)
h = Range(10,-2)

('-' * 30).print

a.print
b.print
c.print
d.print
e.print
f.print
g.print
h.print

('-' * 30).print

[a,b,c,d,e,f,g,h].eachVertical.print

[a,b,c,d,e,f,g,h].eachVertical => y #(:y)
	y.toStr.begin("1> ").add("   "+it).print

[a,b,c,d,e,f,g,h].eachVertical #(9)
	it = 9
	it.toStr.begin("2> ").print

each_par_options.jmo

L = [4,7,4,2,1,9,5,3,1]

##########################

L.filter(each.mem(:e) > 4 || e==1).print
L.filter( :e, e > 4 || e==1).print

::filter(Int x)
	§ = x > 4 || x == 1

L.filter( :{°filter} ).print

##########################

L.reduce(10, each.mem(:f)[1] + f[2]).print
L.reduce(10,  :f, f[1] + f[2]).print

::reduce(Int sum, Int add)
	§ = sum + add

L.reduce(10,  :{°reduce} ).print	# Fehler

##########################

L.map(each.mem(:m) + 2 * m).print
L.map( :m, m + 2 * m).print

::map(Int x)
	§ = x + 2 * x

L.map( :{°map} ).print

##########################

L.copy.sort(each.mem(:s)[1] > s[2] || s[1]==1).print
L.copy.sort( :s, s[1] > s[2] || s[1]==1).print

::sort(Int x, Int y)
	§ = x > y || x == 1

L.copy.sort( :{°sort} ).print

##########################

L.each
	(it/2+it-1).toStr.begin(it+" --> ").align(__LEFT, 11).add("= ").echo
	

	If(it.mem(:t) >= t/2+t-1)
		t.echo
	.else
		'-'.echo
	
	"".print

each_shortcuts.jmo

l = [4,9,8,2,7,3,6,5]

l.print
l.map( each** ).print

l.map( each** ).print
l.map( each** ).print

each_times.jmo

i = 3
Each( i )
	Print it

Print "---"

Each( 3 )
	Print it

Print "---"

Each( 3+1 )
	Print it

Print "---"

Each( i+2 )
	Print it

edit-swing-closeall.jmo

Swing_Main("Main 1").run
m2 = Swing_Main("Main 2").run
m3 = Swing_Main("Main 3").run

Swing_Dialog(m2, 400,300, "Main 2 - Dialog").show
Swing_Window(m3, 800,200, "Main 3 - Window").show

m4 = Swing_Main("Main 4")
w=Swing_Window(m4, 800,200, "Main 4 - Window")
d=Swing_Dialog(m4, 400,300, "Main 4 - Dialog")
m4.run
w.show
d.show

edit-swing-closeall_sleep.jmo

Print "Alle Fenster schließen sich in 1 Sekunde!"

Swing_Main("Main 1").run
m2 = Swing_Main("Main 2").run
m3 = Swing_Main("Main 3").run

Swing_Dialog(m2, 400,300, "Main 2 - Dialog").show
Swing_Window(m3, 800,200, "Main 3 - Window").show

m4 = Swing_Main("Main 4")
w=Swing_Window(m4, 800,200, "Main 4 - Window")
d=Swing_Dialog(m4, 400,300, "Main 4 - Dialog")
m4.run
w.show
d.show

Sleep(1000)
Exit

einfaches_beispiel.jmo

>low

"Bitte eine Zahl zwischen 1 und 10 eingeben.".print

app.resetOutput
"Bitte eine 4 eingeben:".print
app.setOutput("/tmp/jmo_manual_test.txt", true)

nr? = Input.int

If(nr < 1)
	"Die Zahl ist leider zu klein".print
	§exit
If(nr > 10)
	"Die Zahl ist leider zu groß".print
	app.exit

Count(nr)
	it.echo
	".Mal".print

"Fertig".print

emojis.jmo

"😄".print
"😄"[1].ord.print
"😄"[2].ord.print
55357.chr.add(56836.chr).print

"--------------------".print

Emoji.smile.echo
Emoji.get(55357, 56836).echo
Emoji[55357, 56836].echo
e = Emoji
e[10084,65039].echo
Emoji.heart.echo
Emoji.hug.echo
Emoji.hugging.echo
Emoji.laugh.echo
Emoji.holy.echo
Emoji.wink.echo
Emoji.happy.echo
Emoji.tongue.echo
Emoji.love.echo
Emoji.cool.echo
Emoji.kiss.echo

"".print
"This {} is really nice {}! ILY {}".fill(Emoji.love+Emoji.kiss,Emoji.cool,Emoji.heart).print

"--------------------".print
200.times
	c2 = 56825 + it
	Emoji[ 55357, c2.echo.echo(" ") ].print

enum_self1.jmo

::MyColors
	::FOO
	::BAR

########################################

col = MyColors

::test1( e )
	e.print
	#e.value.print
	#e.ordinal.print
	e.name.print
	
	( e == MyColors.FOO ).print
	( e == MyColors.BAR ).print

this.test1( col.FOO )
Print "--------------------------------------------------"
this.test1( col.BAR )

enum_self2.jmo

::MyColors
	::FOO
	::BAR

	::BLUE( 0x0000ff )
	::RED( 0xff0000 )

########################################

col = MyColors

::test1( e )
	e.print
	e.type.print
	#e.value.print
	#e.getValue.print
	#e.getOrdinal.print
	#e.getName.print
	
	( e == MyColors.FOO ).print
	( e == MyColors.BAR ).print

this.test1( col.FOO )
Print "--------------------------------------------------"
this.test1( col.BAR )
Print "--------------------------------------------------"
this.test1( col.BLUE )
Print "--------------------------------------------------"
this.test1( col.RED )

enum_self3.jmo

::MyEnum
	::FOO_BAR
	::BAR_X123
	::P
	::M3

########################################

MyEnum.FOO_BAR.print
MyEnum.BAR_X123.print
MyEnum.P.print
MyEnum.M3.print

enum_self5.jmo

::Foo
	::X1
	::Y2
	::Z3
	::AA = 12345
	::BB( 'b' )

Foo.Y2.print.ordinal.print
Foo.AA.print.print
Foo.BB.print.print

f = Foo
f.X1.print
f.Z3.describe
f.AA.describe
f.BB.describe

enum_self_function.jmo

::MyColors
	::FOO
	::BAR

	::BLUE( 0x0000ff )
	::RED( 0xff0000 )

	::MAGENTA = 0xff00ff

	::BAK

########################################

col = MyColors

col.FOO.print
col.FOO.name.print
col.FOO.type.print
( col.FOO == col.FOO ).print
( col.FOO == MyColors.FOO ).print

"----------".print

col.MAGENTA.print
( col.MAGENTA == col.MAGENTA ).print
( col.MAGENTA == col.FOO ).print
( col.MAGENTA == 0xFF00FF ).print

Print "--------------------------------------------------"

::test2( Enum e )
	e.print
	e.ordinal.print
	e.name.print
	e.typeName.print
	e.parent.print

	If( e.parent != <MyColors> )
		Error("Invalid", "Enumeration: "+e.name ).throw

	Print "----------"

this.test2( col.FOO )
this.test2( col.BAR )
this.test2( col.BAK )

equals.jmo

l = [2b,2s,2i,2l,2c,2f,2d,'2',"2",5,true,false,"abc",nil]

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set(l[x] == l[y], x, y)
		
t.print

equals2.jmo



l = [0,0b,0s,0i,0l,0c,0f,0d,'0',"0","0.0",
	1,1b,1s,1i,1l,1c,1f,1d,'1',"1","1.0",
	3,3b,3s,3i,3l,3c,3f,3d,'3',"3","3.0",
	true,false,'a',"a", "abc",nil]

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] === l[y]).use(cur, " -- "), x,y )
		
t.print
('-'*50).print

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] == l[y]).use(cur, " -- "), x,y)
		
t.print
('-'*50).print

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] ==~ l[y]).use(cur, " -- "), x, y)
		
t.print

equals2not.jmo

l = [0,0b,0s,0i,0l,0c,0f,0d,'0',"0","0.0",
	1,1b,1s,1i,1l,1c,1f,1d,'1',"1","1.0",
	3,3b,3s,3i,3l,3c,3f,3d,'3',"3","3.0",
	true,false,'a',"a", "abc",nil]

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] !== l[y]).use(cur, " -- "), x,y )
		
t.print
('-'*50).print

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] != l[y]).use(cur, " -- "), x,y )
		
t.print
('-'*50).print

t = Table(l.len, l.len, nil)
{l.len} => y
	{l.len} => x
		t.set((l[x] !=~ l[y]).use(cur, " -- "), x,y)
		
t.print

events_1.jmo

::@event

°::@event
	"Go".print

°::@event
	"Wuhuuu!".print

°@event
°.@event

events_2.jmo

f=Swing_Main
b=Swing_Button

b.setText("Start")

b::@select
	"Klick".print

f.add(b)
f.setSize(400,250)
f.run

events_2_1.jmo

f=Swing_Main
b=Swing_Button

b.setText("Klick")

b::@select
	"Klick".print

f.add(b)
f.setSize(400,250)
f.run

events_2_2.jmo

f=Swing_Main
b1=Swing_Button
b2=Swing_Button
g=Swing_LayoutGrid(1,2)

b1.setText("Start")
b2.setText("Klick")

b1::@select
	"Start".print

b2::@select
	"Klick".print

g.add(b1,b2)
f.add(g)
f.setSize(400,250)
f.run

events_3.jmo

::@test

#########################

°::@test
	"bla".print
	it.print

°::@test
	"foo".print
	it.print

°::@test
	"bar".print
	it.print

#########################

°@test("uvwxyz")
"----------".print
this.@test("abcdef")
"----------".print
°@test()
"----------".print
°@test

event_handler_consts_1.jmo

::@foo

A = 11
B = 22

this::@foo
	"Go {} {} {}".fill(A,B,C).print

C = 33

this.@foo

this.@foo

event_handler_consts_2.jmo

::@foo

a = 11
B = 22

this::@foo
	"Go {} {} {}".fill(a,B,C).print

C = 33

this.@foo
a = 12
this.@foo

event_handler_consts_3.jmo

::@foo

A = 11
B = 22

this::@foo
	"Go {} {} {}".fill(A,B,C).print

C = 33

this.@foo
this.@foo

event_handler_consts_4.jmo

:: Button(Int nr)
	::@test
	::hit
		"Hit ".add(nr).print
		this.@test

numButtons = []
{0,9}
	numButtons += Button(it)

::printList
	list.print

list = [1,3,5,7]
{0,9}
	numButtons[it+1]::@test
		this.printList

list.add(9)
list = list.left(2)
list.print

numButtons[5].hit
numButtons[2].hit

event_handler_const_copy1.jmo

::@select

aa = 1
bb = 2
CC = 3

this::@select
	Print aa
	Print bb
	Print CC

this.@select

event_handler_const_copy2.jmo

::@select

aa = 1
bb = 2
CC = 3

this::@select
	Print aa
	Print bb
	Print CC

this.@select

event_handler_vars.jmo

::@foo

a = 2
b = 3
C = 4

this::@foo
	Print "--- Event-Handler ---"
	a =++
	b = b + b
	Print "a: "+a
	Print "C: "+C
	x =++

x = 100
a = 10
this.@foo
a = 20
this.@foo
this.@foo

Print "-------------"
Print "a: "+a
Print "b: "+b
Print "C: "+C
Print "x: "+x

event_handler_vars1.jmo

::@foo

a = 11

this::@foo
	"Go {} {}".fill(a,b).print

b = 21
this.@foo
a = 12
b = 22
this.@foo

event_let_right.jmo

::Foo
	val = 1

	::@event

	::run
		this.@event( val )
		val =++

f = Foo

f::@event => foo
	Print "-- Event --"
	Print foo
	Print it

f::@event.echo("-> ").print

f.run
f.run
f.run

exit_1.jmo

'a'.print
app.exit
'b'.print

exit_2.jmo

'a'.print
app.exit(2)
'b'.print

exit_3.jmo

'a'.print
app.exit
'b'.print

exit_4.jmo

'a'.print
app = 0
'b'.print

filesys_1_dir.jmo

f1 = Dir("/tmp/test1")

f2 = File("/tmp/test2")
f3 = Path("/tmp/test3")

f1.print
'-'.print
f2.print(cur.type).print
"--".print
f3.print(cur.type).print.to.print(cur.type).print
'-'.print
f3.print(cur.type).print.toFile.print(cur.type).print
'-'.print
f3.print(cur.type).print.toDir.print(cur.type).print

f4 = f3.toDir

"-----".print

f1.exists.print
f1.create.print
f1.exists.print

f4.exists.print
f4.create.print

"---".print

"---".print

f1.parent.print
f1.name.print
f1.isDir.print
f1.isFile.print
f1.isHidden.print
f1.rename("test11").print

f1.move("/tmp/test13").print

"-".print

f1.exists.print
f1.delete.print
f1.exists.print
f4.delete

filesys_1_file.jmo

f1 = File("/tmp/test1.txt")

f2 = Dir("/tmp/test2.txt")
f3 = Path("/tmp/test3.txt")

f1.print
f2.print(cur.type).print
f3.print(cur.type).print.to.print(cur.type).print

"---".print

f1.exists.print
f1.touch.print
f1.exists.print

f2.exists.print
f2.create.print

"---".print

"---".print

f1.parent.print
f1.name.print
f1.isDir.print
f1.isFile.print
f1.isHidden.print
f1.rename("test3.txt").print

f1.move("/tmp/test4.txt").print

"-".print

f1.exists.print
f1.delete.print
f1.exists.print
f2.delete

filesys_2_dir.jmo


f1 = Dir("/tmp/")

f1.print
f1.type.print

f2 = f1.makeDir("foo987")
f1.print
f2.print

f2.exists.print
f2.delete
f2.exists.print

filesys_compare.jmo

f1 = Dir("/tmp/test1")

f3 = Path("/tmp/test3")
f4 = f3.toDir

"-----".print

f1.exists.print
f1.create.print
f1.exists.print

f4.exists.print
f4.create.print

"---".print

If( f1.exists )
	f1.delete
If( f4.exists )
	f4.delete

##############################################
(30*'-').print
bf1 = File("/tmp/test1.txt")
bf2 = File("/tmp/test2.txt")
bf3 = Path("/tmp/test3.txt")

bf1.print
bf2.print($.type).print
bf3.print($.type).print.to.print($.type).print

"---".print

bf1.exists.print
bf1.touch.print
bf1.exists.print

bf2.exists.print
bf2.create.print

"---".print

(bf1==bf2).print	# TODO false?!?
(bf1.equals(bf2)).print # TODO false???

"---".print

bf1.parent.print
bf1.name.print
bf1.isDir.print
bf1.isFile.print
bf1.isHidden.print
bf1.rename("test3.txt").print

bf1.move("/tmp/test4.txt").print

"-".print

bf1.exists.print
bf1.delete.print
bf1.exists.print
bf2.delete

file_2020-05-24.jmo

f = File("/home/mike/Prog/JayMo/tests_local/testdir/foo.txt")
f.print
"-----".print

f.size.print
"-----".print

f.name.print
"-----".print

f.suffix.print
"-----".print

f.absolutePath.describe

f.path.describe
f.describe
"-----".print

f.directory.print
f.dir.print
f.dir.type.print
"-----".print

f.created.print
"-----".print

f.modified.print
"-----".print

file_bytearray.jmo

DIR = "/home/mike/Prog/JayMo/tests_local/testdir/"

f = File(DIR+"foo.txt")
f.read.describe
BA = f.readBytes.describe

f2 = File(DIR+"copy.txt")
f2.writeBytes BA
f2.size.print

file_copy.jmo

DIR = "/home/mike/Prog/JayMo/tests_local/testdir/"
DIR2 = "/home/mike/Prog/JayMo/tests_local/testdir/test1"

f = File(DIR+"foo.txt")
f.describe
f.size.print

Print

c1 = f.copy(DIR2)
c1.describe
c1.size.print
c1.exists.print
c1.delete
c1.exists.print

Print

c2 = f.copy(DIR2 + "/copy1.txt")
c2.describe
c2.size.print
c2.exists.print
c2.delete
c2.exists.print

Print

c3 = f.copy( Dir(DIR2) )
c3.describe
c3.size.print
c3.exists.print
c3.delete
c3.exists.print

Print

c4 = f.copy( File(DIR2+"/copy2.txt") )
c4.describe
c4.size.print
c4.exists.print
c4.delete
c4.exists.print

file_copy2.jmo

source = File("/tmp/jaymo-test.txt").touch.print
Print source.exists
dest = File("/tmp/jaymo-test-copy.txt").print
Print dest.exists

File copy = source.copy(dest).print
Print copy.exists

Print

source.delete.print
Print source.exists
copy.delete.print
Print copy.exists

file_read_write.jmo

f = File("/tmp/rw_test.txt")
f.exists.print
f.create
f.exists.print
c1 = f.created
this._sleep(2000)
f.touch
c2 = f.created
"{}  {} {}".fill( c1 != c2, c1.toStr.len, c2.toStr.len ).print
f.delete
f.touch
f.exists.print
f.read.ident

Print "----------------------"

f.append("123").append("456")
f.write("abc", 5)
f.size.print
f.append("def")
f.read.print
f.set("XYZ")
f.read.print

Print "----------------------"

CS = Charset.ISO_8859_15

f.set("äöü", CS)

f.read.print
f.read(CS).print
f.append("ÄÖÜ", CS)
f.write("ßéá", 5, CS)
f.read.print
f.read(CS).print

Print "----------------------"

f.clear
f.read.ident
128.toByte.print
ba = [228,229,232,234,238,245,248]b
f.setBytes(ba)
f.read.print
f.read(CS).print
ba = ByteArray(5).content(64b,65b,66b,67b,68b)
f.writeBytes(ba, 4)
f.appendBytes(ba)
f.read.print
f.read(CS).print

Print "----------------------"

f.delete
f.exists.print

file_read_write.jmo



f = File("/tmp/file.txt")

f.set("123456789__-")

f.append(4)
f.read.print

f.write("this")
f.read.print

f.write("abcdef", 3)
f.read.print

f.write(12345, 1)
f.read.print

f.write(6789, 6)
f.read.print

f.write("-", 12)
f.read.print

f.write("__", 10)
f.read.print

floor_division.jmo

5.neg.print
6.2.neg.print
"---".print
(5*3.neg.print).print

"----------".print

( 100/35 ).print # => 2.857142857142857

"-".print

( 100/~35 ).print
( 100./~35 ).print
( 100.0/~35 ).print
( 100/~35.0 ).print
( 100 /~ 22 ).print

"-".print
( 100/35 )~.print
( 100/~35 )~.print
( 100./~35 )~.print
( 100.0/35 )~.print
( 100/35.0 )~.print

"-".print
5.2.floor.print
5.9.roundDown.print
5.floor.print
5.roundDown.print
5.round.print

"-".print
5.2~.print
5.9~.print
5.2.round.print
5.9.round.print

"----------".print

( 100/35 ).print
( 100//35 ).print
( 100.//35 ).print
( 100.0//35 ).print
( 100//35.0 ).print

floor_division_2.jmo

( 5 / 2 ).print
( 5.0 / 2 ).print

"---".print

( 5 /~ 2 ).print
( 5.0 /~ 2 ).print

"---".print

( -5 / 2 ).print
( -5.0 / 2 ).print

"---".print

( -5 /~ 2 ).print
( -5.0 /~ 2 ).print

"==========".print

5~.print
5.2~.print
5.floor.print
5.2.floor.print

"---".print

-5~.print
-5.2~.print
-5.floor.print
-5.2.floor.print

for.jmo

### Int ###

f=Count(1,9,2)
f.type.print
f.each.print

f=Count(1,9)
f.type.print
f.each.print

f=Count(9)
f.type.print
f.each.print

f=Count(1..9)
f.type.print
f.each.print

f=Count(1..9,2)
f.type.print
f.each.print

('-'*10).print

### Dec ###

f=Count(1.1,9.9,2.2)
f.type.print
f.each.print

f=Count(1.1,9.9)
f.type.print
f.each.print

f=Count(9.9)
f.type.print
f.each.print

f=Count(1.1..9.9)
f.type.print
f.each.print

f=Count(1.1..9.9,2.2)
f.type.print
f.each.print

('-'*10).print

### Shortcut Int ###

formatstring_align.jmo

[1b, 2s, 4i, 5l, 8a, 1.0c, 2.0f, 4.0d, 5.0z, 'c', "uvw", false, true]
.each
	"{5}".fill(it).print

for_each_type.jmo

"--- 1".print
{3s, 5s}
	it.echo(it.type).print

"--- 2".print
{3b, 5}
	it.echo(it.type).print
	
"--- 3".print
{3b, 5s}
	it.echo(it.type).print
	
"--- 4".print
{3s, 5b}
	it.echo(it.type).print
	
"--- 5".print
{3b, 5b}
	it.echo(it.type).print

"--- 6".print
{3i, 5l}
	it.echo(it.type).print

"--- 7".print
{'A', 67l}
	it.echo(it.type).print

for_loop.jmo

Count(3, 9, 2).each.echo; "".print

Count(3, 9, 2).each.echo; "".print

Count(2, 8).each.echo; "".print

Count(19, 15).each
	"--> {}".fill(it).print

{9,0, -3}.echo; "".print

{9,3, -2}
	"> {}".fill(it).print

ftps_client.jmo

Print "User:"
user = Input.str

Print "Password:"
pass = Input.str

ftp = FtpsClient("localhost", user, pass)

ftp.connect
ftp.system.print
ftp.current.print
ftp.dir.print

ftp.close

ftp_client.jmo

Print "User:"
user = Input.str

Print "Password:"
pass = Input.str

ftp = FtpClient("localhost", user, pass)

ftp.connect
ftp.system.print
ftp.current.print
ftp.dir.print

ftp.close

funclet_1.jmo


::func1 = 2+98

l = []

l.add(°func1).print
l.add(:{°func1}.print).print

x= :{°func1}
l.add(x)

l.print

l[2].print
l[2].exec.print
l[3].exec.print
x.exec.print

funclet_2.jmo

x= :{5.mul}
l=[]

l.add(x).print
l.add(5.add(9)).print
l.add( :{ 5.add } ).print

l.print
l[1].exec(9).print
l[3].exec(3).print

funclet_3.jmo

::func = 2+98

x = :{°func}
x.exec.print

::mySum(a,b) = a+b

Object y? = :{°mySum}
y?.ifExec(4,6).print
y?.exec(4,6).print
y? = 3
y?.ifExec(4,6).print

funclet_4.jmo

f = :{"abc".len}
f.exec.print
f.type.print

funclet_5.jmo


::sum(Int i, Int j)
	§= 2*(i+j)

°sum(9,4).print

l = []

l.add(°sum(3,2)).print
l.add(:{°sum}).print

x= :{°sum}
l.add(x)

l.print

l[2].print
l[2].exec(5,6).print
l[3].exec(7,8).print
x.exec(2,8).print

funclet_filter.jmo

::func1(Int i) Bool
	§= i<4 || i==7

::func2(Int i) Bool = i<3

l = [4,7,4,2,1,9,5,3,1]

l.print
l.filter(each.mem(:a) > 4 || a==1).print
l.filter(:{°func1}).print
l.filter(:{°func2}).print
l.filter(each > 7).print
l.filter(each > 7).print
l.filter(true).print
l.filter(false).print

funclet_ifExec.jmo

::func0
	§= 5+2

::func1(a)
	§= a+1

::func2(a,b)
	§= a+b+3
	
::funcX0(x)
	x.ifExec.print

::funcX1(x)
	x.ifExec(7).print

::funcX2(x)
	x.ifExec(9,3).print

::funcR
	§=:{°func0}

###############################

°func0.print
°func1(2).print
°func2(3,5).print

°funcX0(:{°func0}).print
°funcX1(:{°func1}).print
°funcX2(:{°func2}).print

°funcR.ifExec.print

funclet_map_sort.jmo

::mapTest(Str a) Str
	§= ">" + a + "i"

::sort4(Str a, Str b) Bool
	(a.len < 4 || b.len < 4)
		§= false
	§= a[4] < b[4]

data = ["Huber", "Müller", "Meier", "Koch", "Igl", "Dengel", "Hübel"]

data.describe
data = data.map( each.change(1, 'D') ).describe
data.sort.describe

data = data.sort(each.mem(:x)[1][3] > x[2][3]).describe
data = data.sort(:{°sort4}).describe
data = data.map(:{°mapTest}).describe
data = data.map(:{"abc".add}).describe

funclet_reduce.jmo

::myReduce(sum,val)
	§= sum + val

l=[4,9,5,2,6]
l.sum.print

l.reduce(10, :{°myReduce}).print

l.reduce(5, each.mem(:a)[1] + a[2]).print

funclet_style.jmo

::func1 = "abc"
l = []

#####################################

l.add(:{°func1}).print
x= :{°func1}
x.describe

l.add(:{this.func1}).print
x= :{this.func1}
x.describe

l.describe

Print

f = :{"abc".len}
f.describe
f = :{this.func(2,5)}
f.describe
f = :{[].add}
f.describe

Print

:{[].add}.print.exec(123).print
:{[].add}.ident.exec(123).ident
:{[].add}.describe.exec(123).describe

functionmap_1.jmo

nl = FunctionMap
nl.add("hugo", 3)
nl.add("tom", 9)
nl.add("loomy", 'c')

nl.print
nl.get("tom").print
nl.tom.print
nl.loomy.print
nl.hugo.print
nl.keys.print
nl.length.print

nl.add("foo", 8).add("bak", 0)
nl.len.print
nl.sub("foo").length.print
nl.set("tom", 11).print
nl.objects.print
nl.keys.print

nl.hasKey("Thomas").print
nl.containsKey("tom").print
nl.hasObject('c').print
nl.containsObject('c').print

Try
	nl.add("print", -1)
.catch
	it.message.print

Try
	nl.add("Paris", -1)
.catch
	it.message.print

Try
	nl.add(" 23_:#+", -1)
.catch
	it.message.print

Try
	nl.add("hugo", -1)
.catch
	it.message.print

############################
"---".print

nl.isEmpty.print
nl.clear
nl.isEmpty.print

functionmap_2.jmo

nl = FunctionMap
nl.add("errors", 1)
nl.add("objicts", 2)
nl.add("output", 3);
nl.add("result", 4);
nl.add("name", 5);

nl.print

"---".print

nl.errors.print
nl.objects.print
nl.objicts.print
nl.output.print
nl.result.print
nl.name.print

"---".print

nl.error.print
nl.nam.print
nl.obj.print
nl.err.print
nl.res.print

Try
	nl.n.print
.catch.message.print
Try
	nl.na.print
.catch.message.print
Try
	nl.add("objects",9)
.catch.message.print

functionmap_3.jmo

::albert
	"foo".print

::berta()
	§ = 4

::charly(Int a)
	§ = a+2
	
::doris(Bool b, Char c) Char
	§ = b.use(c , 'p')

nl = FunctionMap
nl.add("andi", :{°albert})
nl.add("bernhard", :{°berta})
nl.add("clara", :{°charly})
nl.add("dieter", :{°doris})
nl.add("xaver", "123")
nl.add("varlet", :xyz)

nl.print

"---".print

nl.andi.print
nl.bernhard.print
nl.clara(7).print
nl.dieter(true, 't').print
nl.dieter(true!, 't').print
nl.xaver.print

functionmap_4.jmo

map = FunctionMap
map.add("a", 5)
map.add("ab", 7)
map.add("abc", 9)

map.keys.describe
map.objects.describe

map.a.print
map.ab.print
map.abc.print

"---".print

map2 = FunctionMap
map2.add("a", 1)
map2.add("bc", 2)
map2.add("def", 3)
map2.add("g_x", 4)
map2.add("h1", 5)
map2.add("ijkl", 6)

map2.print
map2.describe
map2.keys.describe
map2.objects.describe

map2.a.print
map2.bc.print
map2.def.print
map2.g_x.print
map2.h1.print
map2.ijkl.print
map2.ijk.print

Try
	map2.b.print
.catch.message.print
Try
	map2.de.print
.catch.message.print
Try
	map2.g.print
.catch.message.print
Try
	map2.i.print
.catch.message.print
Try
	map2.ij.print
.catch.message.print

"---".print

Try
	map2.add("012", 45)
.catch.message.print

functionmap_5.jmo

::getString = "abc"
::add(Int a, Int b) Int = a+b

map = FunctionMap
map.add("abc", :{°getString}).add("adition", :{°add})
map.abc.print
map.adition(4, 6).print

"---".print

map = FunctionMap
map.add("errors", 123)
map.errors.print
map.err.print

"---".print

map = FunctionMap
map.add("test", 123)
map.test.print

functions_oneline.jmo

::test1(a,b) = a+b

::test2(a,b) Int = a+b

°test1(2,3).print
°test2(4,5).print

function_1.jmo

::foo
	a=5
	b=5
	(a==b)
		"Gleich".print

		§= it

	"foo".print

°foo.print

#########################################

"Lets start".print
::Uff

::guru
	"guru-wow".print

::huhu(a)
	("huhu: "+a).print

"Run".print

this.guru
this.huhu("UHU")
"Finish".print

function_atomic_autoconvert.jmo

::Test( Str ss, Int ii, Long ll )
	ss.print.type.print
	ii.print.type.print
	ll.print.type.print

Test(1, 2b, 3).print
"--------------------------------".print

::test( Str ss, Int ii, Long ll )
	ss.print.type.print
	ii.print.type.print
	ll.print.type.print

this.test( 1, 2b, 3 ).print
"--------------------------------".print

# Atomare Typen können gemäß ihrem Rang nach oben automatisiert umgewandelt werden.

::foo( Table tab, Bool bo, Byte by, Short sh, Int in, Long lo, Dec dc, Float fl, Double de, Char ch, Str st )
	tab.add( bo, by, sh, in, lo, dc, fl, de, ch, st )

table = Table(10)
l = [ false, 1b, 2s, 3i, 4l, 5c, 6f, 7d, '8', "9" ]

this.foo( table, true, 1b, 2b, 3b, 4b, 5b, 6b, 7b, '8', '9' )
this.foo( table, true, 1b, 2b, 3b, 4b, 5b, 6b, 7b, '8', 9b )

table.describe
"--------------------------------".print

# ArgumentTestDummy( Nil, Bool, Int, Long, Dec, Double, Char, Str, AtomicValue, Object )
dummy = ArgumentTestDummy( nil, true, 5b, 6, 7, 8, 'a', 'b', false, [] )
"-----".print
dummy.testNil( nil ).describe
dummy.testInt( 1b ).describe
dummy.testInt( 2s ).describe
dummy.testStr( 3b ).describe
dummy.testStr( 4l ).describe
dummy.testStr( '5' ).describe

function_cycle.jmo

::test(nr)
	nr.print
	(nr < 3)
		('a'+nr).print
		"---".print
		°test(nr + 1)

°test(1).print

function_defaultvalue.jmo

::test(one, two?, three?=nil)
	(""+one+" | "+two?+" | ").echo
	§= three?.print

°test(1,2,3).print
°test(4,5,6).print
°test(7,8).print
°test('a','b','c').print
°test("l",NIL,nil).print	# Beide nil sind gültig
°test("1",'-'*5,5+3).print

function_defaultvalue_2.jmo

::def(Int a, Int b = 2, Int c, Int d = 4)
	(a+b+c+d).print

°def(5,6,7,8)	#26
°def(5,6,7)		#22
°def(5,6)		#17

"-----".print

::test(Int start, VarLet v? = nil, Object proc)
	(v? == nil)
		"v == nil".print
		Return
	{start, 9} => c
		v?.set(c)
		(it+" "+v?.get+" "+proc).print

aa = 2
°test(6, :aa, aa == 8)
aa.print

"---".print

aa = 2
°test(6, aa == 8).print

function_definition_1.jmo

::foo() Str?
	§ = "abc"
	

°foo.print

function_empty_1.jmo

::test1(nr) Bool?
	#NoBlock

°test1(1).print

::test2(nr)
	#NoBlock

°test2(1).print

::test3
	#NoBlock

°test3.print

function_empty_2.jmo

::foo

::bar() Str?
::bla

::bak() Same
::bal(a) Int?

####################

°foo.print
°bar.print
°bla.print
°bak.print
°bal(3).print

function_empty_4_low.jmo

>low

::test1?
::test2

°test1.print
°test2.print

function_empty_4_medium.jmo

>medium

::test1?
::test2

this.test1.print
this.test2.print

function_empty_5.jmo

::foo!!?

this.foo.print

function_empty_6.jmo

::foo() Int?

this.foo.print

function_multipar_1.jmo

::funky(a, b)
	a.print
	§= (a+b).print

°funky(3,4).print

function_multipar_2.jmo

::funky(Int a, Int b)
	a.print
	§= (a+b).print

°funky(3,4).print

function_multipar_3.jmo

::funky(Int a, Int b) Int
	a.print
	§= (a+b).print

°funky(3,4).print

::combine(Str a, Char c) Atomic
	a.print
	§= (a+c).print

°combine("abc",'d').add('e').print

function_multi_names.jmo

:: foo | bar | test
	"fbt".print

this.foo
this.bar
this.test

"---------------------------------".print

::abc|def|ghi( Int a )
	a.print

°abc(4)
°def(6)
°ghi(8)

function_open_arg_1.jmo

::test(Int x)

	If( x > 70 )
		Print "Über 70."
	.else( x > 50 )
		Print "Über 50."
	.else
		Print "Abcdefg."

this.test 40
this.test 60
this.test 80

::Foo(Str s)
	::foo(Int i)
		Print s+" "+i

b1 = Foo( "Foo" )	# Open is not allowed
b1.foo 3

b1.foo( 4+2 )

Print(Foo("A"), Foo("B"), Foo("C"))
Foo "Doo" => b2
Print b2

function_precall.jmo

°test
°test

::test
	"Test".print

°test

function_return_it.jmo

::foo
	it = 3

°foo.print

function_return_nil.jmo

::test1(Int i?)Int
	§ = i?

::test2(Int i?)Int?
	§return(i?)

°test1(4).print
Try
	°test1(nil).print
.catch.detail.print

°test2(5).print
Try
	°test2(nil).print
.catch.detail.print

function_same.jmo

::test1() Same
	1.print

::test2() Same
	2.print
	Return #§<<

::test3() Same
	3.print
	§=°

::test4() Same
	4.print
	§=this

::test5() Same
	5.print
	§="Foo"

°test1.print.test1.print
°test1.test1.print
"---".print
°test2.print.test2.print
°test2.test2.print
"---".print
°test3.print.test3.print
°test3.test3.print
"---".print
°test4.print.test4.print
°test4.test4.print
"---".print
°try
	°test5.print.test5.print
	°test5.test5.print
.catch.detail.print
"---".print

::TestA
	::bak() Int
		§= 9   #'a'

	::foo
		3.print
		§= °

	::bar()
		4.print
		§= °

	::bal()
		5.print
		§= this

TestA.bak.print
TestA.foo.print.bar.print.bal.print

"---".print

::TestB
	::bak() Int
		§= 19 #'a'

	::fo1() Same
		13.print

	::fo2() Same
		14.print
		§=°

	::bar() Same
		15.print
		§= this

	::bal() Same
		16.print
		§= "vierzehn"

TestB.bak.print
TestB.fo1.print.fo2.print.bar.print
TestB.try
	it.bal
.catch.detail.print

function_varargs.jmo

"--- a --------------------".print

::a(Int i, Object f...)
	i.describe
	f.describe

°a(5)
°a(5,9)
°a(5,9,8)
°a(5, 'a', 't', 'p')

"--- b --------------------".print

::b(Int i, f...)
	i.describe
	f.describe

°b(5)
°b(5,9)
°b(5,9,8)
°b(5, 'a', 't', 'p')
	
"--- c --------------------".print

::c(a = 1, b = 'b', c = 3.3, d=4f, e ... )
	"c: {} {} {} {} {}".fill(a,b,c,d,e).describe

°c(5)
°c(5,9)
°c(5,9,8)
°c(5,'a', 't', 'p', 6,3,'z')
	
"--- d --------------------".print

::d(Int i = 4, Atomic a...)
	i.describe
	a.describe

°d(4,'a',6,9,"lkj",3.4)
°d(5,'a', 't', 'p', 6,3,'z')

"--- e --------------------".print

::e(Int i = 4, Char a...)
	i.describe
	a.describe

°e
°e(3)
°e(2,'a')
°e(2,'a','s', 'v', 'b')
Try
	°e(2, 'a','s', "v", 'b')
.catch
	it.message.print
	it.detail.print

"--- f --------------------".print

::f(Int i = 4, Char a...) Int
	i.describe
	a.describe
	§ = 999
	
°f.print
°f(3).print
°f(2,'a').print
°f(2,'a','s', 'v', 'b').print

function_varargs_varlet.jmo

::test(foo...)
	foo.type.print
	foo.describe
	foo.print
	(foo.len > 0)
		foo[1].describe
		foo[1].print
	.else
		"".print
		"".print
	"----------".print
		
	
°test()
°test(2)
°test(2, 7)
°test(2, 'f', "lkj")
°test(nil)

('='*50).print

l = [5,9,7,1]
°test(l)
°test(l...)
°test(l.each...)
°test(:l)

('='*50).print

::foo(xy=9, bla...)
	xy.print
	bla.print

°foo()
°foo(1)
°foo(2,3)
°foo(3,4,5)
°foo(4, [9,8])
°foo(4, l)
°foo(4, :l)

function_without_pars.jmo

::test1
	§= 1

::test3()
	§= 3

::test4() Int
	§= 4

::test5()Int
	§= 5

°test1.print

°test3.print
°test4.print
°test5.print

# -----

::test11 = 11

::test13() = 13

::test14() Int = 14

::test15()Int = 15

°test11.print

°test13.print
°test14.print
°test15.print

# -----

::test21= 21

::test23()= 23

::test24() Int= 24

::test25()Int= 25

°test21.print

°test23.print
°test24.print
°test25.print

func_with_block.jmo

::test1
	"Foo".print
	
Try
	°test1
		it.print
.catch.detail.print

::test2()!!
	"Foo".print
	
Try
	°test2
		it.print
.catch.detail.print

func_with_block2.jmo

::MyType(Int nr)
	::run()!!
		("Run: "+nr).print
		it = nr

		"- BLOCK -".print
		"Block exist: ".echo
		func.hasBlock.print

		"--- Exec Block1->1:".print
		#it = func.execBlock(it).print
		it = func.push(it).print
		"--- Exec Block2->1:".print
		#it = func.execBlock(it+1).print
		it = func.push(it+1).print

		"--- Exec Block3->2:".print
		#it2 = func.execBlock(it+1).print
		it2 = func.push(it+1).print
		("IT2: "+it2).print
		it=++

		"--- Exec Block4:".print
		#func.execBlock(it+1).print
		func.push(it+1).print
		it=++

		"- STREAM -".print
		func.hasStream.print

		"--- Exec Stream1:".print
		it3 = func.execStream(it+1)
		#it3 = func.push(it+1)
		("IT3: "+it3).print
		it4 = func.pushStream(it+2)
		#it4 = func.push(it+2)
		("IT4: "+it4).print
		#it = _STREAM.print

		">>> Leave Function".print
		§ = 'x'

MyType(4).run
	("Block: "+it).print
.print(cur.toStr.begin("Stream: "))

func_with_block2b.jmo

::MyType(Int nr)
	::run()!!Int
		("Run: "+nr).print
		it = 7

		func.print
		func.hasBlock.print
		#func.execBlock(it).print
		#func.execBlock(it).print
		#func.execBlock(it).print
		func.push(it).print
		func.push(it).print
		func.push(it).print
		func.hasStream.print
		func.pushStream(it).print
		func.execStream(it).print
		func.push(it).print
		func.print
		§ = it

MyType(4).run
	("Block: "+it).print
.print("Stream").print

func_with_block3.jmo

"--- 1 ---".print

::test1()!!
	"1a".print

°test1
	"1b".print		# Warum wird das ausgeführt?!?
	__DEBUG.trace
	it.print
.print

"--- 2 ---".print

::test2()!!
	"2a".print
	#func.execBlock(3)
	#func.execStream(4)
	func.push(3)

°test2
	"2b".print
	it.print
.print

"--- 3 ---".print

::test3(Int a)!! #Int
	func.init
	"3a".print
	#res = func.execBlock(a).print(cur.add("-1"))
	#func.execStream(res).print(cur.add("-2"))
	func.push(a).print(cur.add("-2"))

°test3(8)
	"3b".print
	it.print
	it = 2
.print(cur.add("-3"))

"--- 4 ---".print

::test4(Int a)!! #Int
	func.init
	"4a".print
	#res = func.execBlock(a).print(cur.add("-1"))
	#func.execStream(res).print(cur.add("-2"))
	func.push(a).print(cur.add("-2"))
	§ = 9

°test4(8)
	"4b".print
	it.print(cur.add("-3"))
	it = 7
	"abc"
	5
.print

func_with_block4.jmo

"--- 1".print

::MyType1=run
	::run()!!Nil
		"Foo".print

MyType1
	"xyz".print

"--- 2".print

::MyType2()=run
	::run()!!Nil
		"Foo".print

MyType2
	"xyz".print

"--- 3".print

::MyType3()=run
	::run() Nil
		"Foo".print

Try
	MyType3
		"xyz".print
		__DEBUG.trace
.catch.message.print

"--- 4".print

::MyType4(Int nr)=run
	::run()!!Int
		("Run: "+nr).print
		it = nr

		func.hasBlock.print(cur.toStr.begin("Block exists: "))
		#func.execBlock(it+10).print(cur.toStr.begin("Block result: "))
		func.push(it+10).print(cur.toStr.begin("Block result: "))

		func.hasStream.print(cur.toStr.begin("Stream exists: "))
		#func.execStream(it+20).print(cur.toStr.begin("Stream result: "))
		func.push(it+20).print(cur.toStr.begin("Stream result: "))
		§ = it

MyType4(4)
	("Block exec: "+it).print
.print(cur.toStr.begin("Stream exec: ")).print

"-".print

MyType4(5)
	("Block exec: "+it).print

"-".print

MyType4(6)
.print(cur.toStr.begin("Stream exec: ")).print

"--- 5".print

::MyCount(Int num)=count
	::count()!! Int
		{num}
			it = it
			#it = func.execBlock(it)
			#it+=10
			#it = func.execStream(it)
			func.push(it)
		§ = num

MyCount(3)
	it.print
.print

"-".print

MyCount(3)
	it.print

"-".print

MyCount(3)
.print

"--- 6".print

::test = "abc"
°test.print

"--- 7".print

::MyGo(o) = foo
	:: show
		("Show: "+o).print
	:: foo()!!
		it = o
		#it = func.execBlock(it)
		#§ = func.execStream(it)
		§ = func.push(it)

MyGo('x')
	("IT: "+it).print
.print

"-".print

MyGo("rst")
	("IT: "+it).print
	it = "uvw"
.print

"-".print

MyGo(3)
	("IT: "+it).print
.print

"-".print

g = MyGo('e')
g.show
g.foo
	("Buh: "+it).print

func_with_block5.jmo

::test1()!!
	"foo1".print

°test1
"---".print

::test2()!! Int
	"foo2".print
	§= 5

°test2.print
"---".print

::test3(Int a)!! Int
	func.init
	"foo3".print
	a.print
	§= a+1

°test3(5).print
"---".print

::test4()!!
	it = 'a'
	#it = func.execBlock(it)
	#it = func.execStream(it)
	it = func.push(it)
	§ = 'c'

x = °test4
	"xyz".print
	it = 'b'
.print
x.print

func_with_block6.jmo

::test
	Try
		func.init
	.catch.message.print
	4.print
°test

"-----".print

::test1()!!
	func.init
	9.print
°test1

"-----".print

::test3(Int a)!! Int
	"foo3".print
	
	Try
		a.print
	.catch.detail.print
	
	func.init
	a.print
	func.init
	a.print
	(true)
		func.init
		a.print
		{2}
			func.init
			a.print
	
	#func.init(1)	# TODO
	#a.print
	
	§= a*2

x=100
°test3((x=++).print).print

func_with_block7.jmo

list = [3,9,1,5,6,7,2]

::myReduce(Int init, VarLet v? = nil, Int sum)!! Int
	"Init 1".print
	func.init(1)
	"Init 2".print
	func.init(2)
	
	init.type.print
	init.print
	v?.type.print
	v?.print
	v?.ifNotNil
		"v? is not nil".print
	.else
		"v is nil".print
	
	cur2 = init
	list.each => e #(:e)
		p = [cur2, it]
		v?.ifNotNil
			"Init VarLet: ".add(e).print
			v?.set(p)
		
		func.init(3, p)
		cur2 = sum
	
	§ = cur2

x = [0,0]	# Ohne testen!!!

a1 = °myReduce(10, :x, each[1] + x[2])
a1.print
"-----".print
a2 = °myReduce(20, :y, each[1] + y[2])
a2.print
y.print
"-----".print
a3 = °myReduce(30, each.mem(:z)[1] + z[2])
a3.print
"-----".print
a4 = °myReduce(30, 5)
a4.print
"-----".print
a5 = °myReduce(30, each.get(2)+5)
a5.print

func_with_block8.jmo

::test4()!!
	it = 'a'
	#it = func.execBlock(it)
	#it = func.execStream(it)
	it = func.push(it)
	§ = 'c'

s = °test4
	"xyz".print
	it = 'b'
.print
s.print

func_with_block9.jmo

::MyType(Int nr)
	::run()!!
		("Run: "+nr).print
		it = nr

		"- BLOCK -".print
		"Block exist: ".echo
		func.hasBlock.print

		"--- Push 1->1:".print
		it = func.push(it).print
		"--- Push 2->1:".print
		it = func.push(it+1).print

		"--- Push 3->2:".print
		it2 = func.push(it+1).print
		("IT2: "+it2).print
		it=++

		"--- Push 4:".print
		func.push(it+1).print
		it=++

		"- STREAM -".print
		func.hasStream.print

		"--- Push 1:".print
		it3 = func.push(it+1)
		("IT3: "+it3).print
		it4 = func.push(it+2)
		("IT4: "+it4).print

		">>> Leave Function".print
		§ = 'x'

MyType(4).run
	("Block: "+it).print
	it=it+100
.print(cur.toStr.begin("Stream: "))

func_with_block_10.jmo

::MyType(Int nr)
	::uno(Int x)!!Str?
		func.init
		func.push(3)
		it = ">"+nr+x
	::dos1(Int x)!!	Short?  = 1234s
	::dos2(Int x)!!	Short?  = nil
	::tres1(Int x)	Short?  = 1234s
	::tres2(Int x)	Short?  = nil

MyType(4).uno(9)
	("Block: "+it).print
	it = it + 100
.print(cur.toStr.begin("Stream: "))

"-----".print
MyType(5).dos1(8).print
MyType(5).dos2(8).print
"-----".print
MyType(5).tres1(7).print
MyType(5).tres2(7).print

func_with_block_access.jmo

::test1
	1.print
	Try
		func.hasBlock.print
	.catch.message.print
	Try
		#func.execBlock(1).print
		func.push(1).print
	.catch.message.print
	Try
		func.hasStream.print
	.catch.message.print
	Try
		#func.execStream(2).print
		func.push(2).print
	.catch.message.print

this.test1

"-----".print

::MyType
	::test2
		1.print
		Try
			func.hasBlock.print
		.catch.message.print
		Try
			#func.execBlock(1).print
			func.push(1).print
		.catch.message.print
		Try
			func.hasStream.print
		.catch.message.print
		Try
			#func.execStream(2).print
			func.push(2).print
		.catch.message.print

MyType.test2

fuzzy.jmo

Fuzzy fuzzy = Fuzzy

fuzzy.calc( "Ich heiße Michael", "Ich heiße Michael" ).print
fuzzy.calc( "Ich heiße Michael", "Ich heisse Michael" ).print
fuzzy.calc( "Ich heiße Michael", "Mein Name ist Michael" ).print

fuzzy.calcLimited( "Ich heiße Michael", "Mein Name ist Michael" ).print

getset.jmo

::get(nr) = [3,5,7,9].get(nr)

°[2].print

"---".print

l = [3,5,9,7]
l.set(0, 3)    # Variante 1
l[2] = 1       # Variante 2
l.print

"---".print

t = Table(3,3,nil)
t.print
"-".print
t[3,3] = 5
t.print

::set(a,b,c,o)
	"{} {} {} {}".fill(a,b,c,o).print
°[1,2,3] = 'a'

getset_2.jmo

::set(a)
	a.print

::get = "abc"

°[] = 'a'
°[].print

greeter3.jmo

::Greeter(Str who="Welt")
	::hello
		("Hallo " + who).print
		
	::bye
		("Tschüss "+ who).print

# Test

Greeter.hello
Greeter.hello.print

g=Greeter("Michael")
g.hello
g.bye

g2=Greeter("Linux")
g2.hello
g2.bye

greeter_constructor.jmo

::MyTest(a,b)
	::get
		§= a+b

### Test ###

MyTest(2,5).get.print
MyTest(3,6).get.print

a=MyTest(1,3)
b=MyTest(5,8)
(a.get+b.get).print

group.jmo

(((1+2+3+5.print)*2+6*3).print.print+2)
(((1+2+3+5.print)*2+6*3).print.print+3).type.print
# (((1+2+3+5.print)*2+6*3).print.print+4).exec.type.print
(5+1.print).type.print
(6+2.print).print
# (7+3.print).exec
# (8+4.print).exec.type.print
(9+5.print).print

('-'*30).print

Group(10+6.print)
Group(10+6.print).print
Group(10+6.print).get.print
# Group(11+7.print).exec
# Group(12+8.print).exec.print
Group(14+10.print).type.print

group_2.jmo

("he\"ad(").print
("head(\"" + "Bla,Foo".replace(",", "\", \"") + "\");").print

group_3.jmo

( 5 + 3 > 6 ).print
Group( 5 + 3 > 6 ).print
Group( 5 + 3 > 6 ).get.print

"---".print
( 5 + 3 > 6 )
	("1: "+it).print
( 5 + 3 > 6 ).if
	("2: "+it).print

Group( 5 + 3 > 6 ).get
	("4: "+it).print
Group( 5 + 3 > 6 ).get.pass
	("5: "+it).print
Group( 5 + 3 > 6 ).get.if
	("6: "+it).print

"---".print
( 5 + 3 < 6 )
	("a: "+it).print
( 5 + 3 < 6 ).if
	("b: "+it).print

Group( 5 + 3 < 6 ).get
	("d: "+it).print
Group( 5 + 3 < 6 ).get.pass
	("e: "+it).print
Group( 5 + 3 < 6 ).get.if
	("f: "+it).print

"---".print
( 5 + 3 > 6 ).if.print
Group( 5 + 3 > 6 ).print
Group( 5 + 3 > 6 ).get.print
Group( 5 + 3 > 6 ).get.pass.print
Group( 5 + 3 > 6 ).get.if.print

"---".print
( 5 + 3 < 6 ).if.print
Group( 5 + 3 < 6 ).print
Group( 5 + 3 < 6 ).get.print
Group( 5 + 3 < 6 ).get.pass.print
Group( 5 + 3 < 6 ).get.if.print

group_4.jmo

true
	1.print
1.toBool.if
	2.print

a = true

a.if
	3.print
	
b = "abc"

b.each
	it.print

"-------".print

Try
	( "abc".print )
		it.print
.catch.detail.print

Try
	( 1+3*5-7 )
		it.print
.catch.detail.print

group_5.jmo

Group g1 = Group( 3+5 )

g1.get(:X)
X.print

g1.get(:y)
y.print

g1.get.print

group_shortcut.jmo

(1+2.print)
(3+4.print).print
(5+6.print).toBool.if
	it.print
(7+8.print).toBool.if
	it.print
(9+0.print).print

('-'*10).print

Group(1+2.print)
Group(3+4.print).print
Group(5+6.print).get.toBool.if
	it.print
Group(7+8.print).get.toBool.if
	it.print
Group(9+0.print).get.print

handling_blocks_streams_at_loop.jmo

# Loops always repeat block and stream
#########################################################################

3.times
	it.print
	'a'.echo
.print("")

"-----".print

3.times.print.times
	'a'.echo
.print("")

"-----".print

3.times.print.pass
	it.times
		'a'.echo
	"".print

hash.jmo

s = "Dies ist ein geheimer Text"

md5 = HashMD5
md5.add(s)
md5.add("Foo")
Base64.encode(md5.compute).bytes.arrange(Charset.ASCII).print

"-----".print

sha = HashSHA(1)
sha.add(s)
sha.add("Foo")
Base64.encode(sha.compute).bytes.arrange(Charset.ASCII).print

"-----".print

sha = HashSHA(512)
sha.add(s)
sha.add("Foo")
Base64.encode(sha.compute).bytes.arrange(Charset.ASCII).print

help_quickly_1.jmo

Help.quickly("Number.r")
Print "-------------------------------"
Help.quickly("Date(")
Print "-------------------------------"
?T
Print "-------------------------------"
a=?T; Print a
Print "-------------------------------"
?T;?G;?a;?c
Print "-------------------------------"
?T;123.add(45).print.print('f').ident('g').describe('h')

hexToInt.jmo

c="fb4e568623b5f8cf7e932e6ba7eddc0db9f42a712718f488bdc0bf880dd3"
c.print

l=[]
{1, c.length, 2}
	it.echo
	" --> ".echo
	p=c.cut(it,2)
	p.echo
	" --> ".echo
	a=p.parseHex.print
	l.add(a)
l.print

hot_execution_1.jmo

>unsafeHotCode

a = 11
a.print
jmo.exec("a = 22; a.print")
a.print
app.exec("a = 33; a.print")
a.print
"a = 44; a.print".jmo
a.print

hsqldb_1.jmo

db=HSqlDB
db.open
db.exec("CREATE TABLE test1 (nummer INTEGER NOT NULL PRIMARY KEY)").print

db.update("INSERT INTO test1 VALUES 5").print
db.update("INSERT INTO test1 VALUES 2").print
db.update("INSERT INTO test1 VALUES 9").print

"---".print

db.query("SELECT * FROM test1").getRow.print
db.query("SELECT * FROM test1").getTable.print
db.query("SELECT * FROM test1").getRow.print
db.query("SELECT * FROM test1").getTable.print
db.query("SELECT * FROM test1").getRow.print

"---".print

rset = db.query("SELECT * FROM test1")
rset.getRow.print
rset = db.query("SELECT * FROM test1")
rset.getInt.print
rset = db.query("SELECT * FROM test1")
rset.getTable.print

db.close

"##########################################".print

db=HSqlDB("/tmp/hsqldb-test").open
db.exec("CREATE TABLE test2 (nummer INTEGER NOT NULL PRIMARY KEY)").print
db.update("INSERT INTO test2 VALUES 7").print
db.query("SELECT * FROM test2").getTable.print
db.close

File("/tmp/hsqldb-test.properties").delete
File("/tmp/hsqldb-test.script").delete

httpclient.jmo

h = HttpClient
h.fetch("http://feldwies.de").print

ident_describe.jmo

Print 123s
Ident 456s
Describe 789s

Print "-------------------------------------------"

123s.print
456s.ident
789s.describe

Print "-------------------------------------------"

123s.toStr.print
456s.toIdent.print
789s.toDescribe.print

Print "-------------------------------------------"
Print "-------------------------------------------"

# Ident und Describe überschreibbar ?!?

::Foo
	::toStr = "abc"
	::toIdent = "def"
	::toDescribe = "ghi"

F = Foo

Print F
Ident F
Describe F

Print "-------------------------------------------"

F.print
F.ident
F.describe

Print "-------------------------------------------"

F.toStr.print
F.toIdent.print
F.toDescribe.print

if.jmo

(2>1).if.print
(2<1).if.print

ifelse_new.jmo

(2 == 2)
	"2".print
.print

"-----".print

(2 == 3)
	"3".print
.print

"-----".print

(4 == 5)
	"4".print
.else
	"-4".print
.print

"---".print

(5 == 5)
	"5".print
.else
	"-5".print
.print

"---".print

{ 7 } => xy
	xy.echo
	": ".echo
	
	( xy > 5 )
		"abc".print
	.else(  xy == 3 )
		"def".print
	.else( xy <= 1 )
		"ghi".print
	.else
		"uvw".print

ifnot.jmo

IfNot(4 == 4)
	"true".print
.else
	"false".print
	
IfNot(2 == 4)
	"true".print
.else
	"false".print

if_else.jmo

(5==5).if
	"Fünf 1".print
.else
	"Andere Zahl 1".print
.print

(5==1).if
	"Fünf 2".print
.else
	"Andere Zahl 2".print
.print

('-'*10).print

(5==5)
	"Fünf 3".print
.else
	"Andere Zahl 3".print
.print

(5==1)
	"Fünf 4".print
.else
	"Andere Zahl 4".print
.print

('-'*10).print

5.is(5)
	"Fünf 5".print
.else
	"Andere Zahl 5".print
.print

5.is(1)
	"Fünf 6".print
.else
	"Andere Zahl 6".print
.print

('-'*10).print

a= (5==5).if.print
a.print

a= (5==1).if.print
a.print

('-'*10).print

a= 5.is(5).print
a.print

a= 5.is(3).print
a.print

if_ifdo.jmo

3.toBool.if
	it.print
	cur.print
.print
"-----".print

true.if
	it.print
	cur.print
.print
"-----".print

3.is(3)
	it.print
	cur.print
.print
"-----".print

3.if(true)
	it.print
	cur.print
.print
"-----".print

true.is(3)
	it.print
	cur.print
.print
"-----".print

true.if(true)
	it.print
	cur.print
.print
"-----".print

"----------".print

3.passIf(true)
	it.print
	cur.print
.print
"-----".print

true.passIf
	it.print
	cur.print
.print
"-----".print

3.passIs(3)
	it.print
	cur.print
.print
"-----".print

3.passIf(true)
	it.print
	cur.print
.print
"-----".print

true.passIs(3)
	it.print
	cur.print
.print
"-----".print

true.passIf(true)
	it.print
	cur.print
.print
"-----".print

if_is_do.jmo

"### IF ###".print

true.if
	("a"+it).print
.print

false.if
	("b"+it).print
.print

1.if(true)
	("c"+it).print
.print

1.if(false)
	("d"+it).print
.print

"### IF GO ###".print

true.passIf
	("e"+it).print
.print

false.passIf
	("f"+it).print
.print

3.passIf(true)
	("g"+it).print
.print

4.passIf(false)
	("h"+it).print
.print

"### IS ###".print

5.is(5)
	("i"+it).print
.print

5.is(9)
	("n"+it).print
.print

"### IS GO ###".print

6.passIs(6)
	("j"+it).print
.print

7.passIs(6)
	("k"+it).print
.print

if_nil.jmo

::test(a?)
	a?.print
	a?.ifNil
		"a is nil".print
	.else
		"else is".print
	a?.ifNotNil
		"a is not nil".print
	.else
		"else is not".print
	a?.replaceNil(9).print

°test(1)
'-'.mul(5).print
°test(nil)

if_then_else.jmo

### Ohne Block

################
	
	
a=4
a.isEven.if
	it
	.print
.else
	"lkj"
	.print

a.isEven.if
	it.print
.else
	"else".print

5.is(5)
	"Fünf".print
.print

# OK
true.if.print
true.if.print("123");

true.if
	"Is true".print
false.if
	"Is not true".print
false.else
	"Is else".print
false.ifNot
	"Is not".print

(3==3).if.print

a=4

(a==4).if.print
true.if.print
(a==4).print
(a==4).ifNot.print
true.ifNot.print

(a==4).if
	"a==4".print
(a==4).if
	it.print
4.is(4)
	"5".print
4.is(4)
	it.print
a.is(4)
	it.print
a.is(4.print)
	it.print

a.isEven.if
	it.print
	it.not.else
		"else".print

a.isEven.if
	it.print
.print

false.else
	"else".print

a.isEven.not.else
	"else".print

a.isEven.if
	it.print
.not.else.print

immutable_equalslazy.jmo

::test(a, b)
	Echo( a === b )
	Echo( "  " )
	Echo( a == b )
	Echo( "  " )
	Echo( a ==~ b )
	Print
	Print("----------------------------")

d = Date(2021,04,11)
t = Time(10,20,30)
z = DateTime(2021,04,11,10,20,30)

°test( d, d )
°test( d, t )
°test( d, "2021-04-11" )
°test( d, "11.04.2021" )
°test( d, "01.03.2012" )
°test( d, "abcFOO" )

"============================".print

°test( t, t )
°test( t, d )
°test( t, "10:20:30" )
°test( t, "11:04:20" )
°test( t, "" )

"============================".print

°test( z, z )
°test( z, d )
°test( z, "2021-04-11 10:20:30" )
°test( z, "2020-03-21 11:04:20" )
°test( z, "abc" )

incdecpow_multi.jmo

"--- A".print

(5++**--).print
5++**--.print

"--- B".print

a=3
(a++--//).print	# //
a.print

"--- C".print

b=4
(b++**--).print
b.print
(b=++).print
b.print
(b++=3).print
b.print

"--- D".print

c=6
(c=++.inc).print
c.print

"--- E".print

c=6
(c++=3.inc).print
c.print

"--- F".print

c=6
Try
	(c++=3++=2).print
.catch.proc( :y, "{} / {}".fill(y.message, y.detail) ).print
c.print

include_func_1.jmo

>include("/home/mike/git/jaymo/JayMo/test/local/include/include_func_1.jmo")

"Main Begin".print

bb = 1234

this.foo()
this.foo(11,12)
this.foo(21,22,23)

2.times
	this.foo(31,32,33)

::test
	bb = 4321
	this.foo(41,42,43)

this.test

"Main End".print

inc_dec_new_char.jmo

'e'
c = 'm'
D = 'u'

###################################################

Try
	( 'e'++ ).echo; "  ->  ".echo;  'e'.print
.catch.info.print

Try
	( c++ ).echo;  "  ->  ".echo;  c.print
.catch.info.print

Try
	( D++ ).echo;  "  ->  ".echo;  D.print
.catch.info.print

"----------".print

Try
	( 'e'.inc ).echo; "  ->  ".echo;  'e'.print
.catch.info.print

Try
	( c.inc ).echo;  "  ->  ".echo;  c.print
.catch.info.print

Try
	( D.inc ).echo;  "  ->  ".echo;  D.print
.catch.info.print

"----------------------------------------".print

Try
	( 'e'++ 5 ).echo;  "  ->  ".echo;  'e'.print
.catch.info.print

Try
	( c++ 5 ).echo;   "  ->  ".echo;  c.print
.catch.info.print

Try
	( D++ 5 ).echo;   "  ->  ".echo;  D.print
.catch.info.print

"----------".print

( 'e'.inc(5) ).echo;  "  ->  ".echo;  'e'.print

Try
	( c.inc(5) ).echo;   "  ->  ".echo;  c.print
.catch.info.print

Try
	( D.inc(5) ).echo;   "  ->  ".echo;  D.print
.catch.info.print

"----------------------------------------".print

Try
	( 'e'=++ ).echo; "  ->  ".echo;  'e'.print
.catch.info.print

( c=++ ).echo;  "  ->  ".echo;  c.print

Try
	( D=++ ).echo;  "  ->  ".echo;  D.print
.catch.info.print

"----------".print

Try
	( 'e'.incLet ).echo; "  ->  ".echo;  'e'.print
.catch.info.print

( :c.incLet.get ).echo;  "  ->  ".echo;  c.print

Try
	( D.incLet ).echo;  "  ->  ".echo;  D.print
.catch.info.print

"----------------------------------------".print

Try
	( 'e'++= 5 ).echo;   "  ->  ".echo;  'e'.print
.catch.info.print

Try
	( c++= 5 ).echo;   "  ->  ".echo;  c.print
.catch.info.print

Try
	( D++= 5 ).echo;   "  ->  ".echo;  D.print
.catch.info.print

"----------".print

Try
	( 'e'.incLet(5).get ).echo;   "  ->  ".echo;  'e'.print
.catch.info.print

( :c.incLet(5).get ).echo;   "  ->  ".echo;  c.print

Try
	( D.incLet(5) ).echo;   "  ->  ".echo;  D.print
.catch.info.print

inc_dec_new_int.jmo


###################################################

10
a = 20
B = 30

###################################################

Try
	( 10++ ).echo; "  ->  ".echo;  10.print
.catch.info.print

( a++ ).echo;  "  ->  ".echo;  a.print

Try
	( B++ ).echo;  "  ->  ".echo;  B.print
.catch.info.print

"----------".print

Try
	( 10.inc ).echo; "  ->  ".echo;  10.print
.catch.info.print

Try
	( a.inc ).echo;  "  ->  ".echo;  a.print
.catch.info.print

Try
	( B.inc ).echo;  "  ->  ".echo;  B.print
.catch.info.print

"----------------------------------------".print

Try
	( 10++ 5 ).echo;  "  ->  ".echo;  10.print
.catch.info.print

Try
	( a++ 5 ).echo;   "  ->  ".echo;  a.print
.catch.info.print

Try
	( B++ 5 ).echo;   "  ->  ".echo;  B.print
.catch.info.print

"----------".print

( 10.inc(5) ).echo;  "  ->  ".echo;  10.print

Try
	( a.inc(5) ).echo;   "  ->  ".echo;  a.print
.catch.info.print

Try
	( B.inc(5) ).echo;   "  ->  ".echo;  B.print
.catch.info.print

"----------------------------------------".print

Try
	( 10=++ ).echo; "  ->  ".echo;  10.print
.catch.info.print

( a=++ ).echo;  "  ->  ".echo;  a.print

Try
	( B=++ ).echo;  "  ->  ".echo;  B.print
.catch.info.print

"----------".print

Try
	( 10.incLet ).echo; "  ->  ".echo;  10.print
.catch.info.print

( :a.incLet.get ).echo;  "  ->  ".echo;  a.print

Try
	( :B.incLet ).echo;  "  ->  ".echo;  B.print
.catch.info.print

"----------------------------------------".print

Try
	( 10++= 5 ).echo;   "  ->  ".echo;  10.print
.catch.info.print

( a++= 5 ).echo;   "  ->  ".echo;  a.print

Try
	( B++= 5 ).echo;   "  ->  ".echo;  B.print
.catch.info.print

"----------".print

Try
	( 10.incLet(5) ).echo;   "  ->  ".echo;  10.print
.catch.info.print

( :a.incLet(5).get ).echo;   "  ->  ".echo;  a.print

Try
	( :B.incLet(5) ).echo;   "  ->  ".echo;  B.print
.catch.info.print

inc_dec_var_const.jmo

10
a = 20
B = 30

###################################################

( 10++ ).echo; "  ->  ".echo;  10.print
( a++ ).echo;  "  ->  ".echo;  a.print
( B++ ).echo;  "  ->  ".echo;  B.print

"----------".print

( a=++ ).echo;  "  ->  ".echo;  a.print

"----------".print

( 10++ 5 ).echo;  "  ->  ".echo;  10.print
( a++ 5 ).echo;   "  ->  ".echo;  a.print
( B++ 5 ).echo;   "  ->  ".echo;  B.print

"----------".print

( a++= 5 ).echo;   "  ->  ".echo;  a.print

###################################################

info_controller.jmo


a = app
a.print
a.type.print
# a = 3
# a < 5

a.exit
7.print

input_1.jmo

app.resetOutput

Print "Please input: 1, 2.0, 3, 4:"

app.setOutput("/tmp/jmo_manual_test.txt", true)

"Input decimal: ".echo
Input.dec.print

"Input decimal: ".echo
Input.dec.print

"Input integer: ".echo
Input.int.print

"Input string: ".echo
Input.str.print

############################

insert.jmo

"Hlo".insert( "al", 2 ).print
"-----".print

s = "abcde".print
6.times
	s.insert( '§', it ).print
"-----".print
{-1, -6}
	s.insert( '§', it ).print

Try
	s.insert( '§', 0 ).print
.catch.info.print
Try
	s.insert( '§', 7 ).print
.catch.info.print
Try
	s.insert( '§', -7 ).print
.catch.info.print

"################################".print

l = ['a','b','c','d','e'].print
6.times
	l.copy.insert( '§', it ).print
"-----".print
{-1, -6}
	l.copy.insert( '§', it ).print

Try
	l.copy.insert( '§', 0 ).print
.catch.info.print
Try
	l.copy.insert( '§', 7 ).print
.catch.info.print
Try
	l.copy.insert( '§', -7 ).print
.catch.info.print

int.jmo

0.print
654654.print
5.print
4.print()
7.print
111.print
12345.print

('-'*20).print

(23+12).print
(23-12).print
(23*12).print
(23/12).print
(23%12).print

(23++).print
(23--).print

('-'*20).print

(23>12).print
(23<12)		# Keine Ausgabe
(23<12).print
(23>=12).print
(23>=23).print
(23<=12).print
(23<=23).print
(23<=24).print
(23==12).print
(23==23).print
(4!=3).print
(4!=4).print

('-'*20).print

12+5	# Keine Ausgabe
(12+5).print
(5+3).print
(3+2+2).print
(1+2+3+4).print
(1+2+3+4+5+3).print
(2+3+7+2+1).print
(3+1.print).print
(5-3).print
(5*3).print

('-'*20).print

(1-2+3*4+16/8).print #13
(1-2+3*4+16/8).print #13
(2+3*3).print
(3+4*2-1).print

('-'*20).print

3+2+2.print
12+5.print
(2+3+7.print+2+1).print #ok
(5.print+2).print
(5+6+7+4-1).print
(6+3+3*2-1).print
(1.print+5*3.print).print

('-'*20).print

4.echo;5.echo;7.print

int_2.jmo

(6+3+(3*2)-1).print
(6+(3+3)*2-1).print
(3+"1".print.toInt+2).print
(((1+2+3+5)*2+6*3)+2).print
(((1+2+3+5.print)*2+6*3).print.print+2).print

(5++).print
(5--).print
(5**).print
(25//).print

int_3.jmo

5.times.add(126).toHex.print
a=1.add(5)+2.print*3.sub(1)
a.print

123.toHex.type.print
123.toHex.print

int_4.jmo

(5+3+(4*4)).print
(3+(2*8+2*(7-1))+1).print

('-'*30).print

1.times.print+(5*3.print)
(2.times.print+(5*3.print)).print

('-'*30).print

10.times
	(it+it).print

('-'*30).print

a=5
b=(c=((1+a+3+5.print)*2+a*3).print+2).print
(a+2).print
(b+2).print
(c+2).print

int_5.jmo

5.isBetween(3,8).print
2.isBetween(3,8).print
9.isBetween(3,8).print

int_6.jmo

5.type.print
5.types.each.print

-5.print.abs.print

(2**).print; (4//).print
(8**).print; (64//).print
(2**8).print; (256//8).print; (256.log(2)).print
(2**10).print; (1024//10).print; (1024.log(2)).print

int_bitops.jmo

a=60
b=13

(a & b).print
(a | b).print
(a ^ b).print
(a!).print
(a << 2).print
(a >> 2).print

int_bitops_2.jmo

::test(a, b)
	"-----".print
	(a & b).print
	(a | b).print
	(a ^ b).print
	(a!).print
	(a << 2).print
	(a >> 2).print

l1 = [60b, 60s, 60i, 60l, 60a]
l2 = [13b, 13s, 13i, 13l, 13a]

Count( l1.len )
	this.test( l1[it], l2[it] )

int_divisible_print.jmo

0.divisible.print
2.divisible.print
4.divisible.print
10.divisible.print
-10.divisible.print

int_multiply_char.jmo

(10*'?').print
('?'*10).print
(10*"123").print
("123"*10).print

int_style.jmo

14.style("????").print
14.style("0000").print
14.style("####").print

('-'*10).print

s="!?a#0c#b#"

1.style(s).print
12.style(s).print
123.style(s).print
1234.style(s).print
12345.style(s).print
123456.style(s).print

int_to_bin.jmo

123.print.toBin.print.parseBin.print.print("-----")
7.print.toBin.print.parseBin.print.print("-----")
9.print.toBin.print.parseBin.print.print("-----")
172.print.toBin.print.parseBin.print.print("-----")
8320.print.toBin.print.parseBin.print.print("-----")
119070.print.toBin.print.parseBin.print.print("-----")

"---------------------------------".print

"11101000100011110".parseBin.print
[240,157,132,158].map( each.toHex.upper ).implode(" ").print

it.jmo

3.times
	"Test: ".echo
	it.echo
	it.print

it_2.jmo

it? = 3
it.print

it_3.jmo

it = 3
it.print

it? = 4
it?.print
it.print

it? = 5
it?.print
it.print

it_assign.jmo

it.print
5 => it
it.print
3 +=> it
it.print
2 *=> it
it.print
4 /=> it
it.print
1 -=> it
it.print

3.times +=> it
it.print

1.23 ~=> it
it.print

"abc".mem(:it)
it.print
'd'.mem(:it)
it.print

it = it
it.print
it => it
it.print

it = 4
it += 2
it -= 1
it.print
it *= 8
it /= 2
it.print
it %= 3
it.print

it = 20
3 %=> it
it.print

java4jmo.jmo

>? org.jaymo_lang._test.Test_Java4JMo

####################################################

t = Java("Test_Java4JMo");

t.print

t.pubVal.print		# 6
t.pubVal(true).print
t.pubVal(8).print
t.pubVal("-A-").print

t.pubVoid.print		# 5		TODO: Void = Same

t.statVoid.print	# 1
t.stat.print		# 2
t.stat(3).print		# 3
t.stat("-4-").print	# 4

t.getBool.print
t.getInt.print
t.getString.print

####################################################
('-'*10).print

t2 = Java("Test_Java4JMo", [true])
t2.getBool.print
t2.describe

####################################################
('-'*10).print

t3 = Java("Test_Java4JMo", [321])
t3.getInt.print
t3.describe

####################################################
('-'*10).print

t4 = Java("Test_Java4JMo", [false, 123, "Hello!"])
t4.getBool.print
t4.getInt.print
t4.getString.print
t4.describe

####################################################
('-'*10).print

t5 = Java("Test_Java4JMo", [true, 456, "Test!"])

t5.b.print
t5.i.print
t5.s.print
t5.describe

####################################################
('-'*10).print

t6 = Java("org.jaymo_lang._test.Test_Java4JMo")
t6.getInt.print
t6.describe

java_collections.jmo

Java_ArrayList al = Java_ArrayList

al.add( 123 )
al.add( 456 )
al.add( 789 )

Java_Collections.reverse( al )

Count( 0, 2 )
	al.get( it ).print

java_objects.jmo

>? de.mn77.base.data.group.Group2

al = Java("ArrayList")
al.print

al.add(5)
al.add("foo")
al.add('a')
al.add(5.67)

{0,3}
	al.get(it).print

al.toString.print

"-----".print

sys = Java("java.lang.System")
sys.currentTimeMillis.checksum.type.print

sys.out.println("foo").print
sys.err.print.println("foo")
sys.err.print.println("foo")
sys.err.println("foo")

Java("java.lang.System").err.println("foo")

sys.getProperty("os.arch").print

"-----".print

props = Java("java.lang.System").getProperties.print
keys = props.keys.print
While(keys.hasMoreElements)
	key = keys.nextElement
	( key.startsWith("os").not )
		Next
	( key.startsWith("os.version") )
		Next
	
	val = props.get(key)
	"Key: {10}, Value: {}".fill(key,val).print

g = Java("Group2", [5,'x'])
g.toString.print
g.toStr.print
g.o1.print
g.o2.print

java_objects_1b.jmo

al = Java_ArrayList
al.print

java_objects_3.jmo

>prefix "Java"

hs = _HashMap
hs.put(9, "abc")
hs.put(3, "def")
hs.print
hs.get(9).print

al = Java_ArrayList
al.add(2)
al.add(4)
al.add(1)
al.print
al.get(1).print

java_package_type.jmo

>prefix "Java"

counter = 0

::show(Java j)
	counter=++
	j.print(counter).print(cur.type).types.print

###########################################################

Java a1 = Java_ArrayList
°show(a1)

Java_ArrayList a2 = Java_ArrayList
°show(a2)

_ArrayList a3 = Java_ArrayList
°show(a3)

_{java.util.ArrayList} a4 = Java_ArrayList
°show(a4)

Java_{java.util.ArrayList} a5 = Java_ArrayList
°show(a5)

Java_{java.util.ArrayList} a6 = _{java.util.ArrayList}
°show(a6)

Print "-------------------------------------------------------------------"

Java b1 = Java_{java.util.ArrayList}
°show(b1)

Java_ArrayList b2 = Java_{java.util.ArrayList}
°show(b2)

_ArrayList b3 = Java_{java.util.ArrayList}
°show(b3)

_{java.util.ArrayList} b4 = Java_{java.util.ArrayList}
°show(b4)

Java_{java.util.ArrayList} b5 = Java_{java.util.ArrayList}
°show(b5)

Print "-------------------------------------------------------------------"

Java c1 = Java("java.util.ArrayList")
°show(c1)

Java_ArrayList c2 = Java("java.util.ArrayList")
°show(c2)

_ArrayList c3 = Java("java.util.ArrayList")
°show(c3)

_{java.util.ArrayList} c4 = Java("java.util.ArrayList")
°show(c4)

Java_{java.util.ArrayList} c5 = Java("java.util.ArrayList")
°show(c5)

Print "-------------------------------------------------------------------"

<Java_ArrayList>.print
<Java_{java.util.ArrayList}>.print

jaymo_exec_script_args.jmo

# Anders Script mit Argumenten ausführen
# Lädt ein Script und führt es in Sandbox aus.

jaymo.run( Sys.home.toStr+"/git/jaymo/JayMo/test/local/include/run1.jmo", [123,456,789,'a',"foo"] )

jaymo_run.jmo

jaymo.run( "/usr/local/bin/mnvideo_cut_mp4_800" )

Print "-----------------------------------"

jaymo.run( "/usr/local/bin/mnvideo_cut_mp4_800" )

jaymo_version.jmo


jmo.version.till('.').till('-').print
jaymo.version.till('.').till('-').print
jaymo.version.till('.', '-').print

jci_main.jmo

""""
package pkg1;

public class A {
	public static void main(String[] args){
		System.out.println(args[0]);
	}
}
"""" => pkg1A

source = JCI_Source.add( "pkg1.A", pkg1A )
target = JCI_Target
jci = JCI_Janino

jci.compile(source, target).new( "pkg1.A" ).print.main(["foo123"])

json.jmo

json = Json

map = Map
map.add("abc", 123)
map.add("def", 456)
map.add("ghi", 789)

converted = json.encode(map).print
converted.type.print

"-----------------------------------".print

parsed = json.parse(converted)
parsed.print.type.print
"---".print
parsed.get("def").print.type.print
parsed["ghi"].print.type.print

json_1.jmo

Json.object.add("abc", 5).add("xyz", 9).print

JsonObject.add("abc", 5).add("xyz", 9).print

List al = [];
al.add("Foo");
al.add("Bar");
al.add("Bak");
Json.serialize(al).print

Map map = Map;
map.add("key1", 123);
map.add("key2", 987);
Json.serialize(map).print;

Json.serialize(123).print
Json.serialize(123.456f).print
Json.serialize(123.456d).print
Json.serialize("Test").print
Json.serialize("X\\n\"'\\\\x\nx\bx\tx").print
Json.serialize(true).print
Json.serialize(false).print
Json.serialize(nil).print

"----------------------------------------".print

Json.parse("   true   ").print
Json.parse("   {}   ").print
Json.parse("   { }   ").print
Json.parse("   { \"foo\" : 123 }   ").print
Json.parse("   [  true \n \t , \r\n\t false , null \n\t\r ]   ").print

json_2.jmo

""""
{
	"Image": {
		"Width": 800,
		"Height": 600,
		"Title": "View from 15th Floor",
		"Thumbnail": {
			"Url":	"http://www.example.com/image/481989943",
			"Height": 125,
			"Width": 100
		},
		"Animated" : false,
		"IDs": [116, 943, 234, 38793]
	}
}
"""" => json

Json.parse(json).print

json_3.jmo

""""
[
	{
		"precision": "zip",
		"Latitude":  37.7668,
		"Longitude": -122.3959,
		"Address":   "",
		"City":      "SAN FRANCISCO",
		"State":     "CA",
		"Zip":       "94107",
		"Country":   "US"
	},
	{
		"precision": "zip",
		"Latitude":  37.371991,
		"Longitude": -122.026020,
		"Address":   "",
		"City":      "SUNNYVALE",
		"State":     "CA",
		"Zip":       "94085",
		"Country":   "US"
	}
]
"""" => json
json.print
Json.parse(json).print

Json.parse("\"Hello world!\"").print
Json.parse("true").print
Json.parse("42").print

Json.parse(" { \"IDs\": [116, 943, 234, 38793] } ").print

json_4.jmo

::test(Str exp)
	exp = " 123.456"+exp+"3 "
	Json.parse(exp).print

["E","E-","E+","e","e-","e+"].each
	°test(it)

keyvalue.jmo

i1 = KeyValue("doo", 4)
i1.print

i2 = (34->'a').print
i3 = 56->'b'
i4 = 78 -> 'c'

m = Map
m.add( "foo", 6 )
m.add( i1 )
m.add( i2 )
m.add( i3 )
m.add( i4 )
m.add( 'x'.toKeyValue(123) )

m.print

let_right_1.jmo



a = 9
7 %=> a
	Print it
Print a

"-----------------".print

a = 9
7 *=> a
	Print it
Print a

"-----------------".print

a = 9
7 /=> a
	Print it
Print a

"-----------------".print

a = 9
7 +=> a
	Print it
Print a

"-----------------".print

a = 9
7 -=> a
	Print it
Print a

"-----------------".print

a = 9
7 ~=> a
	Print it
Print a

"-----------------".print

a = 9
7 => a
	Print it
Print a

"-----------------".print

7 => b
	Print it

"-----------------".print

7 => C
	Print it

C = 2
Print C

"-----------------".print

7 ~=> d
	Print it

"-----------------".print

7 ~=> E
	Print it

E = 2
Print E

"-----------------".print

Count(3) \\ Z
	Print it
	Print Z
	Print "-"

let_right_2.jmo

>lazyErrors

# Define variables only for a Block, if available

5.times => a
	Print a

Print "---"

# Now possible:

3.times => BB
	Print BB

Try
	Print BB
.catch.info.print

# Clearly:

5 => x
Print x

6 => Y
Print Y

linestart_whitespace_a_.jmo

2.print.times;5.print

linestart_whitespace_a_s.jmo

2.print.times; 5.print

linestart_whitespace_a_st.jmo

2.print.times; 	5.print

linestart_whitespace_a_t.jmo

2.print.times;	5.print

linestart_whitespace_b_t.jmo

2.print.times
	5.print

list_1.jmo

[1,5,8,3,5,2,3,9].print
[1,5,8,3,5,2,3,9].sort.print
[1,5,8,3,5,2,3,9].sort.uniq.add(2).each.print

('-'*20).print

['a','b','c','d'].shuffle.sort.print
['a','b','c','b'].print.shuffle.uniq.sort.print
(['a','c']+'b').sort.reverse.print
['a','b','c','d'].reverse.print

('-'*20).print

['a','b'].length.print
['a','b'].isEmpty.print
[].isEmpty.print
['a','b'].each.print

('-'*20).print

['a','b'].get(2).print
['a','b'].set('z', 1).print

a="Readability".split('a');a.print

a="Readability".split('a');a.print.add("r");a.print;a.sort.reverse.print

list_10.jmo

[1, 2, 3].each.print

"-----".print

a = [[1,2,3], [4,5,6], [7,8,9]]
a[1][1] = 99
a[2,1] = 88
a[2,2] = 77

a.print
a.flatten.print

"-----".print

l = [0] * 5
l.print
# [[0],[0],[0],[0],[0]]

l = [0] * 3 * 2
l.print
# [[[0],[0],[0]],[[0],[0],[0]]]

l = [0,0]*2
l.print
# [[0,0],[0,0]]

list_2.jmo

[9,8,7,6,5,4,3,2,1,9,8,7,6,5,4,3,2,1,0].only(9,7,8).each.echo
"".print
["el pan","la heladeria","la planta","el sol"].only("^el.*"l.toRegEx).each.print
[2..10,2,1..3].unfold.each.echo
"".print

list_3.jmo

a=5;[3..5, a].unfold.each.print
a=5;b=[3..5, a];a=4;b.unfold.each.print
a=5;(1..a).toList.each.print

list_4.jmo

a=[3,4,5,6]
a[2].print
a[3].print
(a[1*2]==a[1+1+1]).print
(a[1*2]==a[(a[2]/2).toInt]).print
a[2-1]=a[a[2].div(2).toInt]+5
a[a[3]-3]=8

b=a[4]-3
(a[2*2]+a[b]+b).print
a.print

c=[5,7,8,2,4]
c[2]=9
d=c[3]+c[1]
c[1+1]=c[2]+c[3]
d.print
c.print

list_5.jmo

a=[1,5,[8,3,5],2,[3,9]]
a.get(3).print
a.print
a.get(5).print
a.print

c=Range(4,7);b=[0..2, c].unfold;b.print;b.each.print

list_6.jmo

link="http://sonstwas.net/tri/lati-bla-foo/evo/test/"

link.print.explode('/').describe.implode('$').print
link.print.explode('/').describe.implode().print
link.print.explode('/').describe.implode.print

list_7.jmo

[1..3].unfold.print.reverse.print.each.print

list=['a']; list[1]='b'; list[1].print

[2..10].unfold.print
(['a']+'c').print

('c'..'h').toList.each.echo; "".print

[2.334..5.332, 1.3].each.print
[2.334..5.332, 1.3].unfold.each.print
[2.334, 5.332, 1.3].each.print
{2.334, 5.332, 1.3}.print

list_8.jmo

l=[1,5,9,2,6]
l.contains(5).print
l.contains(4).print

list_9.jmo

[[1,2,3],[4,5,6],[7,8,9]][2][3].print
[[1,2,3],[4,5,6],[7,8,9]].get(3)[1].print
[[1,2,3],[4,5,6],[7,8,9]].get(1).get(3).print
a=[1,2,3]
[a,[4,5,6],[7,8,9]][1][2].print

list_bugfix.jmo

top=[false,false,false,false]
top.set(true,3)
top.get(2).print
top.print

list_combine.jmo

l1 = []
l2 = []

::init
	l1 = [ 2,4,5,6,7,9 ]
	l2 = [ 0,1,3,4,6,8 ]

########################################

this.init
l1.concat(l2).print
l1.print

"-----".print

this.init
l1.addAll(l2).print
l1.print

"-----".print

this.init
l1.subAll(l2).print
l1.print

this.init
l1.removeAll(l2).print
l1.print

"-----".print

this.init
l1.slice(l2).print
l1.print

this.init
l1.intersect(l2).print
l1.print

list_deep.jmo

list = [11,22,33,[111,[1111,2222,3333,4444],333,444],55,66]
list.print

"---".print

list$4.print
list[4].print
list.get(4).print

"---".print

list[ 4,2,1 ].print
list.get(4,2,1).print
list[ 4,2,1 ]?.print
list.pull([4,2,1].toTempLet).print

"---".print

list.print
list[ 4,2,1 ] = 1
list.set(2, [4,2,2].toTempLet)
list[ 4,2,3 ]? = 3

list.put(4, [4,2,4].toTempLet)
list.print

"---".print

list.get(4).get(2).get(1).print
list.pull(9).print

list.selectLazy(1,2,9,3,-1,-2).print

"---".print

list[9,3,2]? = 'a'
list.print

list_each.jmo

[3,6,8,9]
	it.print
.print

[3,6,8,9].each
	it.print
.print

[3,6,8,9].each  # .do
	it.print
.print

list_equals.jmo

result1 = [1,1,1,1,1]

Print ( result1 === result1 ).use( "Yes!", "No" )
Print ( result1 === [1,1,1,1,1] ).use( "Yes!", "No" )
"---------".print
Print ( result1 == [1,1,1,1,1] ).use( "Yes!", "No" )
Print ( result1 == [1,1,3,1,1] ).use( "Yes!", "No" )
"---------".print
Print ( result1 ==~ [1,1,1,1,1] ).use( "Yes!", "No" )
Print ( result1 ==~ [1,true,'1',1,1] ).use( "Yes!", "No" )
Print ( result1 ==~ [1,true,'1',2,1] ).use( "Yes!", "No" )
Print ( result1 ==~ [1,1,3,1,1] ).use( "Yes!", "No" )

list_fifo.jmo

INIT = [5,9,2,7].fix
INIT.ident
cache = []

Print "--- Last, First ---"

INIT.each
	cache.add it
While(cache.hasNext)
	cache.detachFirst.print
cache.ident

Print "--- Last, Last ---"

INIT.each
	cache.add it
While(cache.hasNext)
	cache.detachLast.print
cache.ident

Print "--- First, First---"

INIT.each
	cache.begin it
While(cache.hasNext)
	cache.detachFirst.print
cache.ident

Print "--- First, Last ---"

INIT.each
	cache.begin it
While(cache.hasNext)
	cache.detachLast.print
cache.ident

Print "=== Last, Last ==="

INIT.each
	cache.add it
While(cache.isEmpty.not)
	cache.detach(-1).print
cache.ident

Print "=== First, First ==="

INIT.each
	cache.begin it
While(cache.isEmpty.not)
	cache.detach(1).print
cache.ident

list_filter.jmo

l = [16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19, 15]
l.print

l.filter( each < l.last ).print

3.times
	"---".print
	l.filter( each <= it*2 + l.last ).print

	l.filter( cur.get(2).toBool ).print
	l.filter( cur[2].toBool ).print

	l.filter( 10 >= 5 ).print
##	l.filter( 10 >= each ).print		# Wirft korrekt Fehler
	l.filter( each.mem(:a).proc(10) <= a ).print

# Dies kann nicht gehen, mem verwenden!

	l.mem(:b).filter( each < (b[2] + it*3 - l.last).print ).print

list_filter2.jmo

l = [2,5,9,7,4,6,8,9,0,1]

::func(Int i)Bool
	§ = i < 5

l.filter( each > 5 ).print
l.filter( :{°func} ).print
a = :{°func}
l.filter( a ).print
b = :a
l.filter( b.get ).print

list_fix.jmo

[].add(2).add(9).fix => l
l.describe

l[1] = 5
l[2] = 7
l.describe

Try
	l.add 3
.catch.info.print
Try
	l[2] = 'x'
.catch.info.print

l.describe

list_fixtype.jmo

l1 = [2,3,4,5]
l1.fixType("Int")

9.types.print
l1.add(9)
l1.set(8, 3)

Try
	l1.add('a')
.catch.detail.print

l1.fixType("Atomic")
l1.add('b')
l1.describe
l1.set("foo",2)

l1.fixType("Object")
l1.add( [] )

Try
	l1.fixType("Fooo")
.catch.detail.print

Try
	l1.fixType("Int")
.catch.detail.print

l1.describe

list_format.jmo

l = ["abc",[0,3,2],Range(8,12)]

form1 = "{}_{}-{}"
l.eachVertical.fill(form1).print

"---".print

form2 = "{2!}_{4>} {1!}"
l.eachVertical.fill(form2).print

list_get_reverse.jmo

l = [4,3,6,2,7]

l.get(1).print
l.get(3).print
l.get(5).print

l[1].print
l[3].print
l[5].print

"---".print

l.get(-1).print
l.get(-3).print
l.get(-5).print

l[-1].print
l[-3].print
l[-5].print

"---".print

::test(List l2, Int pos)
	Try
		l2.get(pos).print
	.catch.detail.print

°test(l, 1)
°test(l, 0)
°test(l, -1)
°test(l, 6)
°test(l, -6)

list_math.jmo

"=== + ==========".print
l1 = [1,2,3]
l2 = [1,2,3]

Print l1 + 7
Print l2 += 7

Print(l1, l2)

"=== - ==========".print
l1 = [1,2,3]
l2 = [1,2,3]

Print l1 - 2
Print l2 -= 2

Print(l1, l2)

"=== * ==========".print
l1 = [1,2,3]
l2 = [1,2,3]

Print l1 * 2
Print l2 *= 2

Print(l1, l2)

"=== / ==========".print
l1 = [1,2,3,4,5,6]
l2 = [1,2,3,4,5,6]

Print l1 / 3
Print l2 /= 3

Print(l1, l2)

"=== ++ ==========".print
l1 = [1,2,3]
l2 = [1,2,3]
l3 = [7,8,9]

Print l1 ++ l3
Print l2 ++= l3

Print(l1, l2)

"=== -- ==========".print
l1 = [1,2,3,4,5,6]
l2 = [1,2,3,4,5,6]

Print l1 -- [2,3,6]
Print l2 --= [2,3,6]

Print(l1, l2)

"-------------------------------------------".print
Print [1,2] + 3
Print [1,2] + [3,4]
Print [1,2] ++ [3,4]
Print [1,2] - 2
Print [1,2] -- [2]
Print [1,2] -- [1,2]
Print [1,2] * 3
Print [1,2,3,4,5,6] / 1
Print [1,2,3,4,5,6] / 2
Print [1,2,3,4,5,6] / 3

list_median.jmo

[
[1],
[1,2],
[1,2,3],
[9,1,7,4],
[9,1,7,4,0],
[3,88,1,2,77],
[],
[1,2,3,4,5,6,7,8],
[3,4,5,6,7,8],
[22, 59, 26, 38, 42, 27, 33, 30, 55]
].each
	"Med: {5d:1}   Avg: {5d:1}".fill( it.median, it.average ).print

list_negative_position.jmo

list = [4,5,8,9,1,7]
list.ident

Print "----------"

list.insert( 0, 3 )
list.ident
list.insert( 2, -1 )
list.ident

Print "----------"

list.delete( 2 )
list.ident
list.delete( -2 )
list.ident

Print "----------"

list.detach( 2 ).print
list.ident
list.detach( -2 ).print
list.ident

Print "----------"

list.get( 2 ).print
list.get( -2 ).print
list.ident

list_pull_put.jmo

"===============================".print

l1 = List
l1.add('a')
l1.add('b')
l1.add('c')
l1.add('d')

"---".print

Try
	l1.get(6).print
.catch.detail.print
Try
	l1.get(6, 1).print
.catch.detail.print
Try
	l1[6].print
.catch.detail.print
Try
	l1[6, 1].print
.catch.detail.print

"---".print

l1.pull(6).print
l1.selectLazy(6, 2).print
l1[6]?.print
l1.selectLazy(6, 2).print
l1[6]?.print
l1[2]?.print
l1.pull(2).print
l1[6]?.print
l1.pull(6).print

"----------".print

l1.print
Try
	l1[7] = 'z'
.catch.detail.print

l1[7]? = 'z'
l1.print
l1[9]? = 'x'
l1.print
l1.put('y', 10)
l1.print
l1[-11]? = 'M'
l1.print
l1[-12]? = 'N'
l1.print
l1.put('O', 13)
l1.print

list_ranges.jmo

[1..5].describe
[1..5].unfold.describe
(1..5).toList.describe

[(2..6).toList,(8..11).toList,44].describe
[('a'..'c').toList,(5..3).toList,[2..4].unfold].describe
[('a'..'c').toList,(5..3).toList,(2..4).toList].describe
[4+2,2..1,5*5].unfold.describe
[2..6].unfold[3].describe

a=[(2..4).toList,['a'..'c'].unfold]
a.describe
a[2].describe
a[2][2].describe
a[1]= 'v'
a[2].set('z', 2)
a.describe

(a[2])[2]= 'x'
a.describe

a[2][2] = 'y'
a.describe

b=[[],[]]
b.describe
b.add("a")
b[1].add("b")
b.describe

list_readonly.jmo

l1 = [ 2,5,8 ]
l1.freeze

Try
	l1.put(0, 1)
.catch.info.print

Try
	l1.set( 0, 2 )
.catch.info.print

Try
	l1.add( 9 )
.catch.info.print

Print "---------------------"

l2 = [ 6, 9, 7 ]
l2.readOnly

Try
	l2.set( 9, 2 )
.catch.info.print

Try
	l2.add( 9 )
.catch.info.print

list_sort.jmo

l = List
l.add("","a","A","ab","+","aa","a","ä","b","B",3)

l.describe

"----------------- sort".print
l.sort
l.describe

#############################################################
"-------------------------------------------------------".print

l = List
l.add("aa","aä","äa","ää","AA","AÄ","ÄA","ÄÄ","BB","a","b")

l.describe

"----------------- sort".print
l.sort
l.describe

#############################################################
"-------------------------------------------------------".print

l = List
l.add("a","ä","A","Ä","B","b","aa","bb","ÄÄ","AA","BB","ää",'a','ä','A','Ä','b','B')

l.describe

"----------------- sort".print
l.sort
l.describe
"-----------------".print
l.each.ident

list_store2.jmo

l=[1,6,8,3,2]
l.store(:a,nil,:b,nil,nil).print

a.print
b.print

list_store3.jmo

y = :X
[3,5,7,9].store( :a, :B, :c, y  ).print
"-----------------".print
a.ident
B.ident
c.ident
y.ident
X.ident

list_strget.jmo

# Doppelpunkt als get/set und nicht als pull/put
list = [1,2,3]
list$3.print
list$1.print

Try
	list$6.print
.catch.detail.print

"---".print

# Bug
items = [4,"lkj",9]
items.print
Try
	items$test.print	#Fehler werfen, geht natürlich nicht!
.catch.detail.print

list_swap.jmo

l = [1,2,3,4,5]
l.print
l.swap(1,5).print
l.print
l.swap(4,1).print
l.swap(1,2).print
l.swap(5,3).print
l.swap(2,2).print
l.print

Try
	l.swap(3,6).print
.catch.detail.print

Try
	l.swap(0,2).print
.catch.detail.print

Try
	l.swap(2).print
.catch.detail.print

list_table_addAll.jmo

l = List
l.add(1,2)
l+=3
l.print
l.concat( [4,5,6] ).print
l.print
(l ++ [10,11,12] ).print
l.print
l.addAll( [7,8,9] ).print
l.print

(30*'-').print

t = Table(2)

t.add(1,2)
t +(3,4)
t.addRows([5,6],[7,8])
t.print

"---".print

t1 = Table(2)
t1.add(1,2)
t1.add(3,4)

t2 = Table(2)
t2.add(5,6)
t2.add(7,8)

(t1 ++ t2).print
"-".print
t1.print
"--".print

t1.concat(t2).print
"-".print
t1.print
"--".print

t1.addAll(t2).print
"-".print
t1.print

list_toMap.jmo

l = [2,5,9,7,4]
keys = ['b','e','d','a','c']
m = l.toMap( keys )

m.print
m$d.print

l.add(1)
keys.add('x')
m.print

list_tostr.jmo

::show(List l)
	Print l
	Ident l
	Describe l

this.show [1,[2,2,[3,3,3,3,3,3],2,2],1]
Print "--------------------------"
this.show [1,[2,2,[3,3,3,[4,4,4,4,4,4,4,4],3,3,3],2,2],1]

list_touniquemap.jmo

l = [7,8,2,4,7,5,4,0,2,4,7,5,3,8,6,0,9,7,1,4].freeze

l.copy.unique.print
Print "-----"

m = l.toUniqueMap.print

Print "-----"

[2,4,6,7,3,2,1].each
	m.count it
m.print

Print "-----"

m.inc( 3 )
m.inc( 5 )
m.dec( 4 )
m.count( 'a' )
m.count( 'b' )
m.count( 'b' )
m.print

m.toTable.describe

Print '-'*70

m = Map
m.add('b',1b)
m.add('s',2s)
m.add('i',3i)
m.add('l',4l)
m.add('c',8c)
m.add('f',5f)
m.add('d',6d)
m.add('S',"String")

['b','s','i','l','c','f','d'].each
	m.inc( it )

Try
	m.inc( 'S' )
.catch.info.print
m.describe

list_unfold.jmo

[2..10,2,1..3].unfold.each.echo
"".print

list_varlet.jmo

l=[1,6,8,3,2]
l.store(:a,:c,:b,:d,:e).print

a.print
b.print
c.print
d.print
e.print

Try
	l.store(:x)
.catch.detail.print

Try
	l.store(:u,:v,:w,:x,:y,:z)
.catch.detail.print

l.store(:f,:f,:f,:f,:f).print
f.print

loops.jmo

"--- Count ---".print

Count(3,9)
	If(it == 5)
		loop.next #>>
	If(it == 8)
		loop.break #||
	it.print

"--- While ---".print

b=true
i=1
While(b)
	i=++
	If(i == 5)
		loop.next #>>
	If(i == 8)
		loop.break #||
	If(i == 10)
		b=false
	i.print

"--- Repeat ---".print

b=true
i=1
Repeat(b)
	i=++
	If(i == 5)
		loop.next #>>
	If(i == 8)
		loop.break #||
	If(i == 10)
		b=false
	i.print

"--- List ---".print

[4,9,3,5,1,9,4,6,8]
	If(it == 5)
		loop.next #>>
	If(it == 6)
		loop.break #||
	it.print

"--- Range ---".print

4..9
	If(it == 5)
		loop.next #>>
	If(it == 8)
		loop.break #||
	it.print

loops_2.jmo

5.times => a  # (:a)
	("=== Go: "+a).print
	F1 = loop
	[10..19].unfold.each => b #(:b)
		b.print
		(b==12)
			"Next at {}/{}".fill(a,b).print
			F1.next
		(b==15)
			"Exit at {}/{}".fill(a,b).print
			F1.break
		('-'*10).print
"End".print

loops_3.jmo

Count( 10 )
	it.print
	If( it == 5 )
		loop.break
	
i = 9
While( i > 2 )
	i =--
	If(i == 5)
		loop.next
	i.print

loops_4.jmo

a = true

:a.while
	"Go".print
	a = false

:a.repeat
	"Do it".print

a.print
:a.print

loop_continue_break.jmo

Count( "abc".len )
	If( it == 2 )
		Next
	it.print

"---".print

Count( "abc".len )
	If( it == 2 )
		Break
	it.print

"======".print

Count( "abc".len )
	If( it == 2 )
		loop.next
	it.print

"---".print

Count( "abc".len )
	If( it == 2 )
		loop.break
	it.print

"======".print

Count( "abc".len )
	If( it == 2 )
		loop.next #continue
	it.print

"---".print

Count( "abc".len )
	If( it == 2 )
		Break
	it.print

"======".print

Count( "abc".len )
	If( it == 2 )
		loop.next
	it.print

"---".print

Count( "abc".len )
	If( it == 2 )
		loop.break
	it.print

"======".print

Count( "abc".len )
	If( it == 2 )
		Next #±>>
	it.print

"---".print

Count( "abc".len )
	If( it == 2 )
		Break #±||
	it.print

loop_counter.jmo

5.times
	loop.lap.echo
	loop.lap.echo	# &.lap.echo
	it.print

5.timesDown
	loop.lap.echo
	it.print

"---".print

5l.times
	loop.lap.echo
	loop.lap.echo #&.lap.echo
	it.print

5l.timesDown
	loop.lap.echo
	it.print

"---".print

"foobar".each
	loop.lap.echo
	it.print

"---".print

{5}
	it.toStr.begin("Item: ").print
	#it.toStr.begin("Nr: ").print
	loop.lap.toStr.begin("Counter: ").print

Count(4.6, 9.2, 1.3).each
	loop.lap.echo
	it.print

{3,20, 4}
	it.toStr.begin("Item: ").print
	#it.toStr.begin("Nr: ").print
	loop.lap.toStr.begin("Counter: ").print

"---".print

i = 0
Repeat(i < 4)
	i=++
	loop.lap.echo
	it.print

"---".print

i = 0
While(i < 4)
	i=++
	loop.lap.echo
	it.print

"---".print

[5,4,8,7,9].each
	loop.lap.echo
	it.print

[5,4,8,7,9].eachVertical
	loop.lap.echo
	it.print

"---".print

Map m = Map
m.add("abc",5).add("bde",2).add("lkj",9)

m.each
	loop.lap.echo
	it.print
m.each
	loop.lap.echo
	it.describe

"---".print

Table t = Table(3)
t.add("abc",5,'a').add("bde",2,'b').add("lkj",9,'l')

t.each
	loop.lap.echo
	it.describe

loop_counter_pathlist.jmo

Dir("/home/mike/Prog/JayMo/tests_local/testdir").list.each
	loop.lap.echo.echo(':')
	it.print

loop_equals.jmo

a = 5.times
	it.print
	(it == 3)
		loop = 9

a.print

"----------------------".print

b = 5.times.print.proc( :x, (x == 3).if.proc( loop = 9) ).print
b.print

loop_inline.jmo


L = Range(9).toList

#########################################

L.each.passIf(cur>3).echo
"".print

L.each.passIfNot(cur>3).echo
"".print

L.each.passIf(cur>3)
	it.echo
"".print

L.each.passIf(cur>3).passIsNot(9).passIsNot(6).passIs(1,5,7,9).passIf(cur<8).echo
"".print

L.each.passIsNot(6,7,9,2).echo
"".print

L.each.passIs(6,7,9,2).echo
"".print

"--------------".print

L.each.passIf(cur>3).breakAt(1,7,9,2).echo
"".print

L.each.passIf(cur>3).breakAt(1,7,9,2)
	it.echo
"".print

"---".print

L.each.breakIf(cur >= 6).echo
"".print

L.each.breakIf(cur >= 6)
	it.echo
"".print

"---".print

L.each.passIf(cur>3).passIsNot(6,7,9,2).breakIs(8).breakIf(cur == 1).echo
"".print

L.each.passIf(cur>3).passIfNot(cur<0).passIs(4,3,9,0,5).passIsNot(6,7,9,2).breakAt(8).breakIf(cur == 1).echo
"".print

"---".print

L.each.breakIf(:a, a>4 && a != 9)
	it.print

loop_inline_2.jmo

9.times.breakAt(6,7,9).echo
"".print
9.times.breakIs(6,7,9).echo
"".print
9.times.breakAtNot(1,2,3,4,6,7).echo
"".print
9.times.breakIsNot(1,2,3,4,6,7).echo
"".print

"----------".print

9.times.breakIf( cur > 5 ).echo
"".print
9.times.breakIfNot( cur < 4 ).echo
"".print

loop_object.jmo

i = 1
Loop
	If( i==5 )
		Break
	Print i
	i=++

####################

i = 1
Loop.each
	If( i == 5 ).then
		Break
	Print(i)
	i=++

####################

Loop
	(loop.lap == 5)
		Break
	loop.lap.print

####################

Loop
	(it == 5)
		Break
	it.print

loop_shortcuts.jmo

10.times
	(it == 3)
		loop.next
	(it == 5)
		loop.next
	(it == 8)
		loop.break
	it.print

"---".print

5.times
	(it == 3)
		loop.break
	it.print

lua_to_jmo_1.jmo

::MyPrint(x...)
	LEN = x.len
	Count(LEN).each => i  #(:i)
		(i != LEN)
			x[i].echo
		.else
			x[i].print	
	#x.each.print

MyPrint( 4,6,9 )

"-----------------------------------".print

::func1(par1, par2)
	Print("Function 1: ",par1,par2)

this.func1("lkj", "ert")

tabelle1 = ||||
"Eins"
"Zwei"
"Drei"
||||
Print(tabelle1[2])

If(3 == 2+2)
	"3 == 2+2".print
.else(3 == 2+3)
	"3 == 2+3".print
.else
	"3 == irgendwas anderes".print

var1 = 2
If(var1 != 4)
	Print("ist nicht 4")

var2 = 'x'
Echo( 5, 9, var2, 'a' )
Print( 1,2,var2, 3,"lkj")

macro_1.jmo

::left
	"Left".print

::right
	"Right".print

m = Macro
m.add(:{°left})
m.add(:{°right})
m.add(:{°left})
m.add(:{°left})
m.add(:{°right})
m.add(:{°right})
m.add(:{°left})
m.add(:{°right})

"--- Go! ---".print
m.exec
"--- Again! ---".print
m.exec

macro_2.jmo

::move(MagicPosition pos, Int time)
	("Move "+time+" times to "+pos).print

m = Macro
m.add(:{°move(__LEFT, 8)})
m.add(:{°move(__RIGHT, 3)})
m.add(:{°move(__LEFT, 5)})
m.add(:{°move(__LEFT, 7)})
m.add(:{°move(__RIGHT, 2)})
m.add(:{°move(__RIGHT, 1)})
m.add(:{°move(__LEFT, 4)})
m.add(:{°move(__RIGHT, 9)})

"Go!".print
m.exec
"Again!".print
m.exec

magicconst_1.jmo

__LINE.print
__FILE.print
__LINE.print

magicconst_invalid_use.jmo

app.print

Try
	func.print
.catch.message.print

Try
	#5.print(func.execStream(1,2,3,4).print).print
	5.print(func.push(1,2,3,4).print).print
.catch.message.print

this.print

Try
	loop.print
.catch.message.print

"---".print

3.times
	loop.print
	#loop.getValue.print
	( it == 2)
		loop.break

"---".print

3.times
	( it == 2)
		loop.next
	loop.print

"---".print

2.times
	'a'.print
	loop.break
	'b'.print

magicconst_self_1.jmo

::__ABC = "Fog"

__ABC.print
Print __ABC
Print __ABC+__ABC+__ABC
Print 5*__ABC
Print __ABC[2]
Print __ABC.len

::xy
	Print __ABC

::Test
	Print __ABC
	::qwert
		Print __ABC+__ABC

Print "---"
this.xy
Print "---"
Test.qwert

magicconst_self_2.jmo

::__STR = "String"
::__INT = 123
::__DEC = 123.456
::__CHAR = 'r'
::__SHORT = 12s
::__BIGINT = 1234567890a
::__DATE = Date(2022,1,20)
::__TIME = Time(11,22,33)

Ident __STR
Ident __INT
Ident __DEC
Ident __CHAR
Ident __SHORT
Ident __BIGINT
Ident __DATE
Ident __TIME

magicvar_jmo.jmo

jmo.version.print
j = jmo
j.version.print

magic_constants.jmo

::test(mc)
	mc.describe.type.print
	Print "-----"

°test( __PI )
°test( __E )

°test( __TOP_LEFT )
°test( __TOP )
°test( __TOP_RIGHT )
°test( __LEFT )
°test( __CENTER )
°test( __RIGHT )
°test( __BOTTOM_LEFT )
°test( __BOTTOM )
°test( __BOTTOM_RIGHT )

__PI.print
__E.print

magic_constants_2.jmo

::test(mc)
	mc.describe.type.print
	Print "-----"

°test( __DEVELOPERS )
°test( __SUPPORTERS )
°test( __SPONSORS )

°test( __FILE )
°test( __LINE )
°test( __DEBUG )

magic_constants_axis.jmo

__X_AXIS.print
__Y_AXIS.print
__Z_AXIS.print

Print "-----------"

__X_AXIS.print
__Y_AXIS.ident
__Z_AXIS.describe

Print "-----------"

::foo( MagicAxis axis )
	Print axis

this.foo( __X_AXIS )

magic_vars_2.jmo

>lazyErrors

Try
	func.print
.catch.info.print

::foo
	"--- func".print
	func.print
	func.toStr.print
	
	(func.try +=3).catch.info.print
	(func.try.convertLet(3)).catch.info.print

	Try
		func.print
	.catch.info.print
	Try
		func =++
	.catch.info.print
	(func.try +=3).catch.info.print
	Try
		func +=4
	.catch.info.print
	Try
		func = "abc"
	.catch.info.print

	"--- END ---".print

°foo.print

magic_var_app_1.jmo

"abc".print
app = 0
"def".print

magic_var_app_2.jmo

"abc".print
app.exit
"def".print

magic_var_app_3.jmo

"abc".print
app.exit(0)
"def".print

magic_var_app_4.jmo

"abc".print
app.exit
"def".print

magic_var_app_5.jmo

"abc".print
app.exit(0)
"def".print

magic_var_app_6.jmo

a = app
a.print.type.print

# a = 3

a.exit

7.print

magic_var_app_7.jmo

"abc".print
Exit
"def".print

magic_var_app_8.jmo

"abc".print
Exit(0)
"def".print

magic_var_const.jmo

5.print( cur+4 )

"abcdef".map( each++9 ).print

this.print

jmo.print

"--------------------".print

it.print
it = 'x'
it.print

"---".print

a = 3.times
	loop.lap.print
.print
a.toStr.begin("> ").print

"---".print

a = 5.times
	loop.lap.print
	If(it == 3)
		loop = 99
.print
a.toStr.begin("> ").print

"--------------------".print

false.print

FALSE.print
true.print

TRUE.print
nil.print

NIL.print

::test
	func = "abc"

this.test.print

app.print

# This will break the test

magic_var_debug_1.jmo

__DEBUG.note("Foo")
__DEBUG.line
__DEBUG.line
__DEBUG.trace
__DEBUG.vce

1.times
	1.times
		__DEBUG.vce

magic_var_func.jmo

::test1
	func.return
::test2
	func.return(2)
::test3
	func = 3
::test4
	§return
::test5
	§return(5)
::test6
	§ = 6
::test7
	§return(7) #§end(7)
::test8
	func.print

°test1.print
°test2.print
°test3.print
°test4.print
°test5.print
°test6.print
°test7.print
°test8.print

"-----".print

::Test
	Try
		func.print
	.catch.info.print
	Try
		func.return(3)
	.catch.info.print

Test.print

magic_var_jaymo.jmo

jmo.print
jaymo.print

"123.print".jmo.print
"456.print".jaymo.print

magic_var_loop.jmo

[].print.each.print

::test(Int v)
	("===== "+v+" =====").print

	a? = 2.times
		it.echo
		":".print

		( v == 1 )
			loop = 99
		( v == 2 )
			loop.lap.print
		( v == 3 )
			loop.next
		( v == 4 )
			loop.break
		( v == 5 )
			loop.break(88)
		( v == 6 )
			loop.break
		( v == 7 )
			loop.next #continue
		( v == 8 )
			loop.break(77)
		( v == 9 )
			loop.lap.print
		( v == 10 )
			Next
		( v == 11 )
			Break
		( v == 12 )
			loop.break
		( v == 13 )
			loop.next
		( v == 14 )
			loop.break #&end
		( v == 15 )
			loop.print

	.print(cur.toStr.begin("Stream: "))

	a.print(cur.toStr.begin("a: "))

16.times
	°test(it)

magic_var_this.jmo

°print
this.print

man_test_2020-04-26_output.jmo

app.setOutput("/tmp/jmo-test-output.txt", true); 5.print

# Reset output
app.setOutput("/tmp/jmo_manual_test.txt", true)

f = File("/tmp/jmo-test-output.txt")
f.exists.print
f.read.print
f.delete

map.jmo

m=Map
m.add('a',5).add('b',3).add('d',2).add('z',9).print

m.get('b').print
m.keys.describe
m.values.describe
m.len.print

m.set(1,'b').print

m.hasKey('d').print
m.hasKey('u').print

m.sub('a')
m.print
m.len.print

m.isEmpty.print
m.clear.print
m.isEmpty.print
m.print

map_2.jmo

m = Map
m.add(5, "Fünf").add(true, "True").add('x', "Ixx").add("Foo", "Fooooo")
m.print

m.length.print
m.keys.describe
m.values.describe
m.set("Foobar", "Foo").set("Truu", true)
m.isEmpty.print

m.hasKey(true).print
m.hasKey(4).print
m.hasKey("Foo").print
m.hasValue(true).print
m.hasValue("Fünf").print
m.hasValue("Truu").print

m.remove("Foo").print
m.print

map_3.jmo

l=[3];m=Map;m.add(3,l);m.print;l.add(4);l.print;m.print;m.get(3).print

"---".print

m = Map
m.add(3, "Drei").add(4, "Vier").add(5, "Fünf")
m.print
lv = m.values
lk = m.keys
lv.print
lk.print
lk.delete(1)
m.remove(4)

'-'.print

lv.print
lk.print
m.print
m.keys.print
m.values.print

"---".print

m.print
m.put("Sechs", 6)
m.print
m.put("Sex", 6)
m.print
m.put("Sexx", 6)
m.print

map_4.jmo

ABC = "abc"
kv = KeyValue("lkj", 9)
lw = "ert" -> 1

m = Map( ABC->3, "xyz"->5, 'd'->7, kv, lw )
m.describe

Print "------------------"

####################################################

m$xyz.print
m$xyz = 4
m$xyz.print

Print "------------------"

####################################################

m.fix
m$xyz = 6
m$d = 1
m$abc = 2
m.describe

Print "------------------"

Try
	m.add( "uvw" -> 11 )
.catch.info.print

Try
	m.set(1234l, ABC)
.catch.info.print

Try
	m$abc = 34b
.catch.info.print

Print "------------------"

m.describe

map_deep.jmo

m1 = Map
m1.add('a',4)
m1.add('b',3)
m1.add('c',2)
m1.add('d',1)

m2 = Map
m2.add('z', 9)
m2.add('y', 8)
m2.add('x', 7)

m3 = Map
m3.add('r', 5)
m3.add('s', 6)
m3.add('t', 7)

m1.add('e', m2)
m1.add('f', m3)
m2.add('w', m3)

m1.print

"----------".print

m1.set(0,'b').print
m1.get('f').set(1,'s').print
m1.print

"---".print

m1['b']=2
m1['f']['s']= 3
m1.print

"---".print

m1['b']=4
m1['f','s']= 5
m1.print

"----------".print
m1.print
"----------".print

m1.get('c').print
m1.get('e').get('w').get('t').print

"---".print

m1['c'].print
m1['e']['w']['t'].print

"---".print

m1['c'].print
m1['e','w','t'].print

"----------".print

m1['f']['s']=2
m1['f']['s'].print
m1['f','r']=1
m1['f','r'].print
m1.print

"---".print

m1['$','%','!']?=999
m1.print

Try
	m1['e','_','ä'].print
.catch.detail.print
Try
	m1['e','_','ä']= 123
.catch.detail.print

map_pullput.jmo

m1 = Map
m1.add('a',4)
m1.add('b',3)
m1.add('c',2)
m1.add('d',1)

m2 = Map
m2.add('z', 9)
m2.add('y', 8)
m2.add('x', 7)

m3 = Map
m3.add('r', 5)
m3.add('s', 6)
m3.add('t', 7)

m1.add('e', m2)
m1.add('f', m3)
m2.add('w', m3)

m1.print

"---".print

m1.get('f').print
m1.select('f', 'a').print
m1['f'].print

m1.select('f','a').print

"---".print

m1.pull('f').print
m1.selectLazy('f', 's').print
m1['f']?.print
m1.selectLazy('f','s').print

"---".print

m1.print

m1.set(0, 'b').print
m1.get('f').set(1, 's').print
m1.print

m1['b']=1
m1['f']['s']= 2
m1.print

"---".print

m1.print

m1.put(2, 'b').print
m1.put(0, 'z').print

m1.print

m1['b']=3
m1['y']?=2
m1['f','s']=2

m1['f']['s']=2
m1['f','a']?=1
m1.print

map_sort.jmo

list = [7,8,3,2,6,3,4,7,5,4,0,3,2,4,6,7,5,3,8,3,6,0,9,7,1,4].freeze

list.toUniqueMap.describe.print("----------").sort.describe

Print '*'*10

list.toUniqueMap.describe.print("----------").sort(:a, a[1].key > a[2].key).describe

Print '*'*10

list.toUniqueMap.describe.print("----------").sort(:a, a[1].value < a[2].value).describe

map_toList.jmo

m = Map
m.add( 3, 'a' )
m.add( 5, 'b' )
m.add( 7, 'c' )
m.add( 8, 'd' )
m.describe

m.keys.describe

m.values.describe

m.toList.describe
m.toList.print

map_to_table_rotate.jmo

m = Map
m.add("abc", 19)
m.add("def", 28)
m.add("ghi", 37)
m.add("jkl", 46)

m.print
"-------------------".print
t = m.toTable
t.print
"--- ROTATE RIGHT 1 ----------------".print
t.print.print("-----").rotate.print.print("-----").rotate.print
"--- ROTATE RIGHT 2 ----------------".print
t.print.print("-----").rotate(__RIGHT).print.print("-----").rotate(__RIGHT).print
"--- ROTATE LEFT -------------------".print
t.print.print("-----").rotate(__LEFT).print.print("-----").rotate(__LEFT).print
"--- ROTATE titles -------------------".print
t.print.print("-----").rotate.print.print("-----").firstRowTitles.print.print("-----").titles.print

mathlet_2.jmo

::test(Number n)
	"--- ".add(n.type).print
	n.print
	n=++
	n.print
	n=--
	n.print
	n++=9
	n.print
	n--=3
	n.print

°test(5i)
°test(5s)
°test(5b)
°test(5l)
°test(5.4c)
°test(5.4d)
°test(5.4f)

math_let.jmo

# Zuweisung
a = 5
a.print
a += 3
a.print
a -= 2
a.print
a *= 5
a.print
a /= 2
a.print
a %= 4
a.print

# <<=
# >>=

b=true
b &&= false
b.print
b ^^= true
b.print
b=false;
b ||= true
b.print

#### zum testen
(true && false).print
(true || false).print
((true && false)!).print

math_log_exp.jmo

5.pow(2).print
5.pow(3).print
125.sqrt.print
125.root.print
125.root(3).print

Print "-----"

125.log(10).print
125.log10.print

125.ln.print
125.log(__E).print
Print "4.8283137373023015D"	#Math.log(125)

125.log(10).print
125.log10.print

125f.exp.describe
Print "1.9355760420357226E54D"	#Math.exp(125)

Print "-----"
Print 125.ln
Print 125d.exp
Print 125//3
Print 125.log(5)
Print 5**3
Print 5**3.5
Print 5.pow(3)

Print "--- log10 ------------"
125b.log10.ident
125s.log10.ident
125i.log10.ident
125l.log10.ident
125a.log10.ident
125c.log10.ident
125f.log10.ident
125d.log10.ident
125z.log10.ident
Print "--- ln ------------"
125b.ln.ident
125s.ln.ident
125i.ln.ident
125l.ln.ident
125a.ln.ident
125c.ln.ident
125f.ln.ident
125d.ln.ident
125z.ln.ident
Print "--- exp ------------"
3b.exp.ident
3s.exp.ident
3i.exp.ident
3l.exp.ident
3a.exp.ident
3c.exp.ident
3f.exp.ident
3d.exp.ident
3z.exp.ident

memlet_env1.jmo

::test(MemLet x)
	x.print
	If(x.isSet)
		x.get.print
	"isConst: {}  isSet: {}".fill(x.isConst, x.isSet).print
	IfNot(x.isConst && x.isSet)
		Print "Set"
		x.set(234)
		x.get.print
	"-".print
	x.isSet.print
	x.get.print

::run(MemLet z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))
	this.test(z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))

a = 123
b = :a
c = :d
F = 345
G = :F
H = :I

Print "\n===== b ====="
this.run b
Print "\n===== c ====="
this.run c
Print "\n===== :e ====="
this.run :e
Print "\n===== G ====="
this.run G
Print "\n===== H ====="
this.run H
Print "\n===== :J ====="
this.run :J

memlet_env2.jmo

::Test(MemLet x)
	x.print
	If(x.isSet)
		x.get.print
	"isConst: {}  isSet: {}".fill(x.isConst, x.isSet).print
	IfNot(x.isConst && x.isSet)
		Print "Set"
		x.set(234)
		x.get.print
	"-".print
	x.isSet.print
	x.get.print

::run(MemLet z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))
	Test(z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))

a = 123
b = :a
c = :d
F = 345
G = :F
H = :I

Print "\n===== b ====="
this.run b
Print "\n===== c ====="
this.run c
Print "\n===== :e ====="
this.run :e
Print "\n===== G ====="
this.run G
Print "\n===== H ====="
this.run H
Print "\n===== :J ====="
this.run :J

memlet_env3.jmo

::Test(MemLet x)
	::foo
		x.print
		If(x.isSet)
			x.get.print
		"isConst: {}  isSet: {}".fill(x.isConst, x.isSet).print
		IfNot(x.isConst && x.isSet)
			Print "Set"
			x.set(234)
			x.get.print
		"-".print
		x.isSet.print
		x.get.print

::run(MemLet z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))
	Test(z).foo
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))

a = 123
b = :a
c = :d
F = 345
G = :F
H = :I

Print "\n===== b ====="
this.run b
Print "\n===== c ====="
this.run c
Print "\n===== :e ====="
this.run :e
Print "\n===== G ====="
this.run G
Print "\n===== H ====="
this.run H
Print "\n===== :J ====="
this.run :J

memlet_env4.jmo

::Test
	::bar(MemLet x)
		x.print
		If(x.isSet)
			x.get.print
		"isConst: {}  isSet: {}".fill(x.isConst, x.isSet).print
		IfNot(x.isConst && x.isSet)
			Print "Set"
			x.set(234)
			x.get.print
		"-".print
		x.isSet.print
		x.get.print

::run(MemLet z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))
	Test.bar(z)
	Print "--- {} / {} / {}".fill(z, z.isSet, z.isSet.use(z.get, "null"))

a = 123
b = :a
c = :d
F = 345
G = :F
H = :I

Print "\n===== b ====="
this.run b
Print "\n===== c ====="
this.run c
Print "\n===== :e ====="
this.run :e
Print "\n===== G ====="
this.run G
Print "\n===== H ====="
this.run H
Print "\n===== :J ====="
this.run :J

mem_constant.jmo

4.mem(:x).print
x.print

5.mem(:x).print
x.print

6.mem(:Y).print
Y.print

7.mem(:Z).print
Z.print

mem_cur.jmo

abc = cur.print.name.ident
abc.ident

Print "-----------------"

DEF = cur.print.name.ident
DEF.ident

mem_let_1.jmo

a = 111
a = 1
a.print

b ~= 2.2
b.print

Int c = 3
c.print

Int d ~= 4.4
d.print

Print "-----"

:e.set(11)
e.print

:f.setLazy(12.12)
f.print

:g.set(cur.print.proc(13))
g.print

:h.setLazy(cur.print.proc(14.4))
h.print

#################################
Print "------------------------"

AA = 1
AA.print

BB ~= 2
BB.print

Int CC = 3
CC.print

Int DD ~= 4.4
DD.print

Print "-----"

:EE.set(11)
EE.print

:FF.setLazy(12.12)
FF.print

:GG.set(cur.print.proc(13))
GG.print

:HH.setLazy(cur.print.proc(14.4))
HH.print

multidim_array.jmo

k = nil*3
k.print

l = 3*nil
l.print
l.type.print

"----------".print

a = [[1,2,3], [4,5,6], [7,8,9]]
a.print
a[2][1].print
a[2,1].print
a.select(2,1).print

"----------".print

list = [ [1, 2], [4,5], [7,8] ]
list.print

"----------".print

Map m = Map
m.add("ab", 123)
m.add("cd", 234)
m.add("ef", 345)
m.add("gh", 456)
m.add("ij", 567)
m.add("kl", 678)
m.add("mn", 789)
m.add("op", 890)

m.print
m.select("cd","gh","op","ab").print

"----------".print

m2 = Map
m2.add("AB", 'a')
m2.add("CD", 'c')
m2.add("EF", 'e')
m.add("yz", m2)

m.print
m["op"].print
m["yz"]["CD"].print

"----------".print

m["op"].print
m["yz","CD"].print
m$op.print

"----------".print

list.print
list[3].print
list[2,2].print
list[2][2].print

multiline.jmo

[1,5,8,3,5,2,3,9].sort
.uniq
.add(2).print

multiline_2.jmo

(5+3*2/3)
.print

[3,
5
,7
].print

mysqldb_1.jmo

db=MySQL("guru", "tanken", "tanken", "tanken")
db.open

t = db.query("SHOW TABLES").getTable
t.print
"Length: {}  Width: {}".fill(t.len, t.width).print

t = db.query("DESCRIBE hem").getTable
t.print
"Length: {}  Width: {}".fill(t.len, t.width).print

"---".print

db.query("DESCRIBE hem").getStr.print
db.query("DESCRIBE hem").getStr(6).print
db.query("DESCRIBE hem").getRow.print

db.close

negative_zero.jmo

# Double irgendwas ergibt: -0.0

Print -6.7d %   -6.7

Print "\nmod with c,f,d"

Print -3c % -3
Print -3f % -3
Print -3d % -3

Print "\nPrint Ident Describe"

Print -3d % -3
Ident -3d % -3
Describe -3d % -3

Print "\nParsing -0 integer"

Print -0
Print -0b
Print -0s
Print -0i
Print -0l
Print -0a

Print "\nParsing -0 decimal"

Print -0
Print -0c
Print -0f
Print -0d
Print -0z

Print "\nParsing -0.0"

Print -0.0
Print -0.0c
Print -0.0f
Print -0.0d
Print -0.0z

Print "\nCompare"
T = Table(7,7,nil)
L = [0,0c,-0f,0f,-0d,0d,0z]

Print "=="
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] == L[y]
T.style("b!").print

Print "!="
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] != L[y]
T.style("b!").print

Print "<"
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] < L[y]
T.style("b!").print

Print "<="
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] <= L[y]
T.style("b!").print

Print ">"
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] > L[y]
T.style("b!").print

Print ">="
L.len.times => x
	L.len.times => y
		T[x,y] = L[x] >= L[y]
T.style("b!").print

neuroph.jmo

>prefix = "Neuroph"

p = _Perceptron(2,1).print

ts = _TrainSet( 2, 1 ).print
ts.add( [0, 0], [0] )
ts.add( [0, 1], [1] )
ts.add( [1, 0], [1] )
ts.add( [1, 1], [1] )

p.learn(ts)

p.calc( 0, 0 )[1].round.print
p.calc( 0, 1 )[1].round.print
p.calc( 1, 0 )[1].round.print
p.calc( 1, 1 )[1].round.print

#########################################################
Print "--------------------------"

mlp = _MultiLayerPerceptron(2, 2, 1).print

ts = _TrainSet(2, 1)
ts.add([0, 0], [0])
ts.add([0, 1], [1])
ts.add([1, 0], [1])
ts.add([1, 1], [0])

mlp.learn(ts)

mlp.calc(0,0)[1].round.print
mlp.calc(0,1)[1].round.print
mlp.calc(1,0)[1].round.print
mlp.calc(1,1)[1].round.print

neuroph.jmo

>prefix "Neuroph"

Print "Output must be:  0 1 1 1"

# OR

nn = _Perceptron(2, 1)
training = _TrainSet(2, 1)
training.add([0, 0], [0])
training.add([0, 1], [1])
training.add([1, 0], [1])
training.add([1, 1], [1])
nn.learn(training)

nn.save("/tmp/or_perceptron.nnet")

nn.calc(0,0).get(1).toInt.print
nn.calc(0,1).get(1).toInt.print
nn.calc(1,0).get(1).toInt.print
nn.calc(1,1).get(1).toInt.print

nil.jmo

nil.isNil.print
nil.isNil.not.print

5.isNil.print
5.isNil.not.print

5.isNil!.print
nil.isNil!.print

(nil.isNil)
	"1".print
	
(nil.isNil.not)
	"2".print
	
(5.isNil)
	"3".print
	
(5.isNil.not)
	"4".print

(nil.isNil!)
	"5".print
	
(5.isNil!)
	"6".print

nil_2.jmo

true.replaceNil(4).print
nil.replaceNil(5).print

nil_multiply.jmo

( 2*nil ).print
( 3*nil ).print
( 4*NIL ).print
nil.mul(5).print
( nil*6 ).print
( nil*7 ).print
( NIL*8 ).print

nil_null.jmo

# null als alias für nil? Macht wohl Sinn

nil.print

NIL.print

null.print

NULL.print

nil_to_function.jmo

::test(Str a?, Int b?, Bool c)
	"String: ".add(a?).print
	"Int:    ".add(b?).print
	"Bool:   ".add(c).print
	"---".print

°test("foo", 9, true)
°test(nil, 9, true)
°test("foo", nil, true)

Try
	°test("foo", 9, nil)
.catch.message.print

nil_true_false.jmo

nil.print

NIL.print

null.print

NULL.print

true.print

TRUE.print

false.print

FALSE.print

not.jmo

true!.print
true.!.print
false!.print
(true!).print
false.not.print
(true! ^^ true).print
(true! && true).print
(true! && true!).print
(false! && false).print
(false! && false!).print
(true)!.print
true!.isNil!.print
(true !|| false)!.print
(true !|| false).not.print

ntp.jmo

sc = SntpClient
sc.time.print
sc.date.print
sc.dateTime.print
sc.diff.print

Print "---"
sc.update

sc.time.print
sc.date.print
sc.dateTime.print
sc.diff.print

Print "----------------------------------------------"

nc = NtpClient("pool.ntp.org", "ntps1.gwdg.de", "timeserver.rwth-aachen.de")
nc.update

nc.time.print
nc.date.print
nc.dateTime.print
nc.diff.print

number-style_compare_decimal.jmo

num = 123.456

::test(Str style)
	num.style( style ).print
	num.style( style.replace('0','#') ).print
	num.style( style.replace('0','?') ).print
	Print "-----"

this.test("0,000000 %")
this.test("0.000000 %")
this.test("0000,0000 %")
this.test("[0.0]")
this.test("[0.]")
this.test("[.0]")
this.test("[,]")
this.test("[.]")
this.test("0")
this.test("00")
this.test("000")
this.test("0000")

number-style_compare_integer.jmo

num = 123

::test(Str style)
	num.style( style ).print
	num.style( style.replace('0','#') ).print
	num.style( style.replace('0','?') ).print
	Print "-----"

this.test("0,000000 %")
this.test("0.000000 %")
this.test("0000,0000 %")
this.test("[0.0]")
this.test("[0.]")
this.test("[.0]")
this.test("[,]")
this.test("[.]")
this.test("0")
this.test("00")
this.test("000")
this.test("0000")

number-style_compare_table.jmo

tab = Table(4,13,nil)

::test(Int col, Number num)
	tab[ 1,col] = num
	tab[ 2,col] = num.style("0")
	tab[ 3,col] = num.style("#")
	tab[ 4,col] = num.style("?")
	tab[ 5,col] = num.style("0.00 %")
	tab[ 6,col] = num.style("0.## %")
	tab[ 7,col] = num.style("0.?? %")
	tab[ 8,col] = num.style("")
	tab[ 9,col] = num.style(".")
	tab[10,col] = num.style(",")
	tab[11,col] = num.style("[]")
	tab[12,col] = num.style("[.]")
	tab[13,col] = num.style("[,]")

this.test(1, 123.45)
this.test(2, 123.4)
this.test(3, 123)
this.test(4, 123.0)

tab.print

number-style_jump_decimal.jmo

num = 123.456

num.style("000~0,0000 %").print
num.style("###~#,#### %").print
num.style("???~?,???? %").print

Print "-----"

num.style("0000~,0000 %").print
num.style("####~,#### %").print
num.style("????~,???? %").print

Print "-----"

num.style("0000~0000 %").print
num.style("####~#### %").print
num.style("????~???? %").print

Print "-----"

num.style("0000,~0000 %").print
num.style("####,~#### %").print
num.style("????,~???? %").print

Print "-----"

num.style("0000,0~000 %").print
num.style("####,#~### %").print
num.style("????,?~??? %").print

number-style_jump_integer.jmo

# Dezimalzahlen formatieren ?!?!?

num = 123

num.style("000~0,0000 %").print
num.style("###~#,#### %").print
num.style("???~?,???? %").print

Print "-----"

num.style("0000~,0000 %").print
num.style("####~,#### %").print
num.style("????~,???? %").print

Print "-----"

num.style("0000~0000 %").print
num.style("####~#### %").print
num.style("????~???? %").print

Print "-----"

num.style("0000,~0000 %").print
num.style("####,~#### %").print
num.style("????,~???? %").print

Print "-----"

num.style("0000,0~000 %").print
num.style("####,#~### %").print
num.style("????,?~??? %").print

number-style_optional_dot.jmo

::test(Number num)
	num.style("0:00").print
	num.style("#:##").print
	num.style("?:??").print
	Print "---"
	num.style("0;00").print
	num.style("#;##").print
	num.style("?;??").print
	
	Print "-----------------"

this.test(123)
this.test(123.678)

number-style_thousand.jmo

::test(Number num)
	num.style("#_###_##0.00").print
	num.style("?_???_??0.00").print

	num.style("#*###*##0,00").print
	num.style("?*???*??0,00").print

	num.style("#_###_##0.000_000").print
	num.style("#*###*##0,000*000").print

	Print "-----------------"

this.test(0)
this.test(0.0)
this.test(123)
this.test(1234)
this.test(12345)
this.test(1234567)
this.test(12345.678)
this.test(12345.6789123)

numberOverflow_char.jmo



types = ["Byte","Short","Integer","Long","Float","Double","Character"]

min = []
max = []
num = [3b,3s,3i,3l,3c,3f,3d,'3']

4.times
	min.add( Java(types[it]).MIN_VALUE )
min+= (0-Java("Float").MAX_VALUE).toFloat
min+= 0-Java("Double").MAX_VALUE
min+= Java("Character").MIN_VALUE

types.each
	max.add( Java(it).MAX_VALUE )

Object m? = nil

min.print
min.describe
min.map(:m?, m.type.name).print
max.print
max.describe
max.map(:m?, m.type.name).print
num.print
num.describe
num.map(:m?, m.type.name).print

('='*40).print
#################################################
resultMin = []
resultMax = []
resultNum = []
Object z? = nil

{ min.len }
	resultMin += min[it].try.toChar

{ max.len }
	resultMax += max[it].try.toChar

{ num.len }
	resultNum += num[it].try.toChar

resultMin.len.each => y # (:y)
	resultMin[y] = resultMin[y].typeUse( "Error", "ERR", cur)

resultMax = resultMax.map(:z?, z.typeUse( "Error", "ERR", z) )

resultNum.len.each=>y #(:y)
	resultNum[y] = resultNum[y].typeUse( "Error", "ERR", cur)

resultMin.describe
('-'*40).print
resultMax.describe
('-'*40).print
resultNum.describe

('='*40).print
#################################################

cMin = Java("Character").MIN_VALUE
cMax = Java("Character").MAX_VALUE
cNum = '3'
cMin.type.print
cMax.type.print
cNum.type.print

rcMin = []
rcMax = []
rcNum = []

rcMin += cMin.try.toByte
rcMin += cMin.try.toShort
rcMin += cMin.try.toInt
rcMin += cMin.try.toLong
rcMin += cMin.try.toFloat
rcMin += cMin.try.toDouble

rcMax += cMax.try.toByte
rcMax += cMax.try.toShort
rcMax += cMax.try.toInt
rcMax += cMax.try.toLong
rcMax += cMax.try.toFloat
rcMax += cMax.try.toDouble

rcNum += cNum.try.toByte
rcNum += cNum.try.toShort
rcNum += cNum.try.toInt
rcNum += cNum.try.toLong
rcNum += cNum.try.toFloat
rcNum += cNum.try.toDouble

rcMin = rcMin.map(:z?, z.typeUse( "Error", "ERR", z) )
rcMax = rcMax.map(:z?, z.typeUse( "Error", "ERR", z) )
rcNum = rcNum.map(:z?, z.typeUse( "Error", "ERR", z) )

rcMin.describe
rcMax.describe
rcNum.describe

numberOverflow_dec.jmo



types = ["Byte","Short","Integer","Long","Float","Double"]

min = []
max = []

4.times
	min.add( Java(types[it]).MIN_VALUE )
min+= (0-Java("Float").MAX_VALUE).toFloat
min+= 0-Java("Double").MAX_VALUE

types.each
	max.add( Java(it).MAX_VALUE )

Object m? = nil

min.print
min.describe
min.map(:m?, m.type.name).print
max.print
max.describe
max.map(:m?, m.type.name).print

tableMin = Table(types.len, types.len, nil)
tableMax = Table(types.len, types.len, nil)

{ min.len }
	tableMin[ it, 1 ] = min[it].try.toByte
	tableMin[ it, 2 ] = min[it].try.toShort
	tableMin[ it, 3 ] = min[it].try.toInt
	tableMin[ it, 4 ] = min[it].try.toLong
	tableMin[ it, 5 ] = min[it].try.toFloat
	tableMin[ it, 6 ] = min[it].try.toDouble

{ max.len }
	tableMax[ it, 1 ] = max[it].try.toByte
	tableMax[ it, 2 ] = max[it].try.toShort
	tableMax[ it, 3 ] = max[it].try.toInt
	tableMax[ it, 4 ] = max[it].try.toLong
	tableMax[ it, 5 ] = max[it].try.toFloat
	tableMax[ it, 6 ] = max[it].try.toDouble

('-'*40).print
tableMin.len.each => y #(:y)
	tableMin.width.each => x #(:x)
		tableMin[y,x] = tableMin[y,x].proc( :z, z.isError.use("ERR", z))
tableMin.describe

('-'*40).print
tableMax.len.each => y #(:y)
	tableMax.width.each => x #(:x)
		tableMax[y,x] = tableMax[y,x].typeUse( "Error", "ERR", cur)
tableMax.describe

numberOverflow_Int_Convert.jmo

types = ["Byte","Short","Integer","Long"]

min = []
max = []
big = [255s, 65535i, 4294967295l, 9223372036854775807l]

types.each
	min.add( Java(it).MIN_VALUE )

types.each
	max.add( Java(it).MAX_VALUE )

Object m? = nil

min.print
min.describe
min.map(:m?, m.type.name).print
max.print
max.describe
max.map(:m?, m.type.name).print
big.print
big.describe
big.map(:m?, m.type.name).print

tableMin = Table(types.len, types.len, nil)
tableMax = Table(types.len, types.len, nil)
tableBig = Table(types.len, types.len, nil)

{ min.len }
	tableMin[ it, 1 ] = min[it].try.toByte
	tableMin[ it, 2 ] = min[it].try.toShort
	tableMin[ it, 3 ] = min[it].try.toInt
	tableMin[ it, 4 ] = min[it].try.toLong

{ max.len }
	tableMax[ it, 1 ] = max[it].try.toByte
	tableMax[ it, 2 ] = max[it].try.toShort
	tableMax[ it, 3 ] = max[it].try.toInt
	tableMax[ it, 4 ] = max[it].try.toLong

{ big.len }
	tableBig[ it, 1 ] = big[it].try.toByte
	tableBig[ it, 2 ] = big[it].try.toShort
	tableBig[ it, 3 ] = big[it].try.toInt
	tableBig[ it, 4 ] = big[it].try.toLong

('-'*40).print
tableMin.len.each =>y #(:y)
	tableMin.width.each => x #(:x)
		tableMin[y,x] = tableMin[y,x].proc( :z, z.isError.use("ERR", z))
tableMin.describe

('-'*40).print
tableMax.len.each => y #(:y)
	tableMax.width.each => x # (:x)
		tableMax[y,x] = tableMax[y,x].typeUse( "Error", "ERR", cur)
tableMax.describe

('-'*40).print
tableBig.len.each => y #(:y)
	tableBig.width.each => x #(:x)
		tableBig[y,x] = tableBig[y,x].typeUse( "Error", "ERR", cur)
tableBig.describe

numbers_calc_result.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("Dec",    "Dec")
.add("Float",  "Double")
.add("Double", "Double")
.add("Char",   "Str")
.add("Str",    "Str")

::printType(a, b?, x, m, xt?=nil)
	typeA = a.type.name
	typeB = "Nil"
	typeC = x.type.name
	col = tab.column(1)
	pa = col.search(typeA)
	pm = pa

	typeB = b?.type.name
	pb =  col.search(typeB)
	pm = [pa,pb].max

	should = (xt? != nil).use(xt?, tab[pm][2])

	(should == "same")
		should = typeA
	#.else(should == "integer")
	#	should = ( typeA == "Long" || typeB == "Long").use("Long", "Int" )
	.else(should == "decimal")
		should = "Dec"
		(typeA == "Float" || typeB == "Float")
			should = "Double"
		(typeA == "Double" || typeB == "Double")
			should = "Double"
		(typeA == "Long" || typeB == "Long")
			should = "Double"
	.else
		(should == "Dec" && (typeA=="Long"||typeB=="Long"))
			should = "Double"

	"{4} {3} {4} = ({5}) {5}".fill(a, m, b?, typeC, x).print
	
	If( typeC != should )
		"{} {} {} = {} (Should be: {})".fill(typeA,m,typeB,typeC,should).print
		app.exit
	

::test(a, b)
	Object c? = 0
	
	Try
		c? = a + b
		°printType(a, b, c?, "+")
		c? = a - b
		°printType(a, b, c?, "-")
		c? = a * b
		°printType(a, b, c?, "*")
		c? = a / b
		°printType(a, b, c?, "/", "decimal")
		c? = a % b
		°printType(a, b, c?, "%")
		Try
			c? = a.log(b)
			°printType(a, b, c?, "log", "decimal")
		.catch
			"{4} log {4} = {}".fill(a, b, it.detail).print
		c? = a ++ b
		°printType(a, b, c?, "++", "same")
		c? = a -- b
		°printType(a, b, c?, "--", "same")
		c? = a ** b
		°printType(a, b, c?, "**")
		c? = a // b
		°printType(a, b, c?, "//", "decimal")

	.catch
		#it.show
		"{4} ??? {4} = {}".fill(a, b, it.detail).print
	

l = [1b, 2s, 3i, 8l, 3c, 4.5f, 6.7d]  #false, true, 
°test(l.each..., l.each...)

l = [-1b, -2s, -3i, -8l, -3c, -4.5f, -6.7d]  #false, true, 
°test(l.each..., l.each...)

numbers_calc_result2.jmo

::calc(op, a, b)
	( op == 1 )
		§= a + b
	( op == 2 )
		§= a - b
	( op == 3 )
		§= a * b
	( op == 4 )
		§= a / b
	( op == 5 )
		§= a % b
	( op == 6 )
		§= a.log(b)
	( op == 7 )
		§= a ++
	( op == 8 )
		§= a ++ b
	( op == 9 )
		§= a --
	( op == 10 )
		§= a -- b
	( op == 11 )
		§= a **
	( op == 12 )
		§= a ** b
	( op == 13 )
		§= a //
	( op == 14 )
		§= a // b
	( op == 15 )
		§= a.neg
	( op == 16 )
		§= a.abs

::test(List l)
	Count(16).each => op #(:op)
		"----- {} -----".fill(it).print
		LEN = l.len
		TAB = Table( LEN, LEN, 0 )

		Count(LEN).each => y #(:y)
			Count(LEN).each => x # (:x)
				res1 = °calc(op, l[x], l[y])
				TAB.set( res1, y, x )

		TAB.describe

l1 = [3b, 3s, 3i, 3l, 3.0c, 3.0f, 3.0d]  #false, true,
°test(l1)

Print
Print '#'*80
Print

l2 = [-3b, -3s, -3i, -3l, -3.0c, -3.0f, -3.0d]  #false, true,
°test(l2)

numbers_calc_result2_intnumber.jmo

::calc(op, a, b)
	( op == 1 )
		§= a & b
	( op == 2 )
		§= a | b
	( op == 3 )
		§= a ^ b
	( op == 4 )
		§= a <<
	( op == 5 )
		§= a << b
	( op == 6 )
		§= a >>
	( op == 7 )
		§= a >> b

::test(List l, List t)
	Count(7).each => op #(:op)
		"----- {} -----".fill(it).print
		LEN = 4  # l.len
		TAB = Table( LEN, LEN, 0 )

		Count(LEN).each => y #(:y)
			Count(LEN).each => x #(:x)
				res1 = °calc(op, l[x], l[y])
				res2 = °calc(op, t[x], t[y])
				If(res1 != res2)
					"Diff: {} [{}] {3} = {}{} | {}{}".fill(l[x], op, l[y], res1.type, res1, res2.type, res2).print
					#app.exit
				TAB.set( res1, y, x)

		TAB.describe

l1a = [1b, 2s, 3i, 4l]  #false, true,
l1b = [1, 2, 3, 4]  #false, true,
°test(l1a, l1b)

l2a = [-1b, -2s, -3i, -4l]  #false, true,
l2b = [-1, -2, -3, -4]  #false, true,
°test(l2a, l2b)

numbers_calc_result_big.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("BigInt", "BigInt")
.add("Dec",    "Dec")
.add("Float",  "Dec")
.add("Double", "Dec")
.add("BigDec", "BigDec")
.add("Char",   "Str")
.add("Str",    "Str")

::printType(a, b?, x, m, xt?=nil)
	typeA = a.type.name
	typeB = "Nil"
	typeC = x.type.name
	col = tab.column(1)
	pa = col.search(typeA)
	pm = pa

	If( b?.isNil.not )
		typeB = b?.type.name
		pb =  col.search(typeB)
		pm = [pa,pb].max

	should = (xt? != nil).use(xt?, tab[pm][2])
	(should == "same")
		should = typeA
	.else(should == "decimal")
		should = ( typeA.contains( "Big" ) || typeB.contains( "Big" )).use("BigDec", "Dec" )
	.else(should == "integer")
		should = "Int"
		( typeA == "Long" || typeB == "Long")
			should = "Long"
		( typeA == "BigInt" || typeB == "BigInt")
			should = "BigInt"
	.else(should == "Dec")
		( typeA == "BigInt" || typeB == "BigInt")
			should = "BigDec"

	If( should == "Dec")
		uplist = ["Long","Float","Double"]
		If(uplist.contains(typeA) || uplist.contains(typeB))
			should = "Double"

	"{4} {3} {4} = ({5}) {5}".fill(a.toIdent, m, b?.toIdent, typeC, x).print	#TODO 6
	
	If( typeC != should )
		"{} {8} {} = {} (Should be: {})".fill(typeA,m,typeB,typeC,should).print
		#app.exit
	

::test(a, b)
	Object c = 0
	
	Try
		c = a + b
		°printType(a, b, c, "+")
		c = a - b
		°printType(a, b, c, "-")
		c = a * b
		°printType(a, b, c, "*")
		c = a / b
		°printType(a, b, c, "/", "decimal")
		(a > 0)
			c = a % b
			°printType(a, b, c, "%")
		c = a.log(b)
		°printType(a, b, c, "log", "decimal")
		
		c = a ++
		°printType(a, nil, c, "++", "same")
		c = a ++ b
		°printType(a, b, c, "++", "same")
		c = a --
		°printType(a, nil, c, "--", "same")
		c = a -- b
		°printType(a, b, c, "--", "same")
		c = a **
		°printType(a, nil, c, "**")

		(a > 0)
			c = a ** b
			°printType(a, b, c, "**")
			c = a //
			°printType(a, nil, c, "//", "decimal")
			c = a // b
			°printType(a, b, c, "//", "decimal")

		c = a.neg
		°printType(a, nil, c, "neg", "same")
		c = a.abs
		°printType(a, nil, c, "abs", "same")

	.catch
		it.show
		"{5} ??? {5} = {}".fill(a, b, it.detail).print
		Exit
	

l = [2b, 2s, 2i, 2l, 2a, 2f, 2d, 2z]  #false, true, 

°test(l.each..., l.each...)

l = [-2b, -2s, -2i, -2l, -2a, -2f, -2d, -2z]  #false, true, 

°test(l.each..., l.each...)

numbers_calc_result_intnumber.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("Float",  "Dec")
.add("Dec",    "Dec")
.add("Char",   "Str")
.add("Str",    "Str")

::printType(a, b?, x, m, xt?=nil)
	typeA = a.type.name
	typeB = "Nil"
	typeC = x.type.name
	col = tab.column(1)
	pa = col.search(typeA)
	pm = pa

	If( b?.isNil.not )
		typeB = b?.type.name
		pb =  col.search(typeB)
		pm = [pa,pb].max

	should = (xt? != nil).use(xt?, tab[pm][2])
	(should == "same")
		should = typeA
	(should == "integer")
		should = ( typeA == "Long" || typeB == "Long").use( "Long", "Int" )

	"{1} {8} {3} = ({5}) {5}".fill(a, m, b?, typeC, x).print
	
	If( typeC != should )
		"{} {8} {} = {} (Should be: {})".fill(typeA,m,typeB,typeC,should).print
		app.exit
	

::test(a, b)
	Object c? = 0
	
	Try
		c? = a & b
		°printType(a, b, c?, "&")
		c? = a | b
		°printType(a, b, c?, "|")
		c? = a ^ b
		°printType(a, b, c?, "^")
		
		c? = a <<
		°printType(a, nil, c?, "<<")
		c? = a << b
		°printType(a, b, c?, "<<", "integer")
		c? = a >>
		°printType(a, nil, c?, ">>")
		c? = a >> b
		°printType(a, b, c?, ">>", "integer")

	.catch
		it.show
		"{5} ??? {5} = {}".fill(a, b, it.detail).print
		

	

l = [1b, 2s, 3i, 8l]  #false, true, 
°test(l.each..., l.each...)

numbers_calc_result_noarg.jmo

tab = Table(2)
.add("Bool",   "Bool")
.add("Byte",   "Int")
.add("Short",  "Int")
.add("Int",    "Int")
.add("Long",   "Long")
.add("Dec",    "Dec")
.add("Float",  "Double")
.add("Double", "Double")
.add("Char",   "Str")
.add("Str",    "Str")

::printType(a, x, m, xt?=nil)
	typeA = a.type.name
	typeC = x.type.name
	col = tab.column(1)
	pa = col.search(typeA)
	pm = pa

	should = (xt? != nil).use(xt?, tab[pm][2])

	(should == "same")
		should = typeA
	#.else(should == "integer")
	#	should = ( typeA == "Long" || typeB == "Long").use("Long", "Int" )
	.else(should == "decimal")
		should = "Dec"
		(typeA == "Float")
			should = "Double"
		(typeA == "Double")
			should = "Double"
		(typeA == "Long")
			should = "Double"
	.else
		(should == "Dec" && typeA=="Long")
			should = "Double"

	"{5>} {3} = ({5}) {5}".fill(a.toDescribe, m, typeC, x).print
	
	If( typeC != should )
		"{} {} = {} (Should be: {})".fill(typeA,m,typeC,should).print
		app.exit
	

::test(a)
	Object c? = 0
	
	Try
		c? = a.neg
		°printType(a, c?, "neg", "same")
		c? = a.abs
		°printType(a, c?, "abs", "same")
		c? = a ++
		°printType(a, c?, "++", "same")
		c? = a --
		°printType(a, c?, "--", "same")
		c? = a **
		°printType(a, c?, "**")
		c? = a //
		°printType(a, c?, "//", "decimal")

	.catch
		it.show
		"{5} ??? {5} = {}".fill(a, b, it.detail).print
	
	Print

l = [4b, 4s, 4i, 4l, 4c, 4f, 4d]  #false, true, 
°test(l.each...)

l = [-4b, -4s, -4i, -4l, -4c, -4f, -4d]  #false, true, 
°test(l.each...)

numbers_dec_float.jmo



# 5f3
# 4d1

5.3f
4.1d

Try

.catch.show

Try
	#2.4.65.3f
	2.4653f
.catch.show

Try
	234f
.catch.show

a = 2.3f
a.print
a.type.print

b = 4.9d
b.print
b.type.print

a = 7f
a.print
a.type.print

numbers_toml_nan_inf.jmo

# integers
int1 = +99
int2 = 42
int3 = 0
int4 = -17
Describe( int1, int2, int3, int4 )

# hexadecimal with prefix `0x`
hex1 = 0xDEADBEEF
hex2 = 0xdeadbeef
hex3 = 0xdead_beef
Describe( hex1, hex2, hex3 )

# octal with prefix `0o`
oct1 = 0o01234567
oct2 = 0o755
Describe( oct1, oct2 )

# binary with prefix `0b`
bin1 = 0b11010110
Describe( bin1 )

# fractional
float1 = +1.0
float2 = 3.1415
float3 = -0.01
Describe( float1, float2, float3 )

# exponent
float4 = 5e+22d
float5 = 1e06
float6 = -2E-2
Describe( float4, float5, float6 )

# both
float7 = 6.626e-4
Describe( float7 )

# separators
float8 = 224_617.445_991_228
Describe( float8 )

# infinity
infinite1 = infinity # positive infinity
infinite2 = +infinity # positive infinity
infinite3 = -infinity # negative infinity
Describe( infinite1, infinite2, infinite3 )

# not a number
not1 = not_a_number

Describe( not1 )

Print '-' * 40

::decTest(Table tab, DecNumber d)
	tab.add( d, d.isFinite, d.isInfinite, d.isNaN )

t = Table(4)
t.setTitles( "Number", "isFinite", "isInfinite", "isNaN" )
this.decTest( t, 1d )
this.decTest( t, not_a_number )
this.decTest( t, infinity )
this.decTest( t, +infinity )
this.decTest( t, -infinity )
this.decTest( t, 2f )
Describe t

number_conversion.jmo

l = [
123,
123.89,
123.00,
'2',
"123",
"123.00",
"123.89",
"123,00",
"123,89"
]

Each(l) \\ x
	"{6t} {8>}  -->  <Dec> {6>}".fill(x, x.toIdent, x.toDec.toIdent).print
	"{6t} {8>}  -->  <Int> {6>}".fill(x, x.toIdent, x.toInt.toIdent).print

number_cos_sin_tan.jmo

5.cos.print
9.sin.print
3.tan.print
1.acos.print
1.asin.print
6.atan.print

number_exponential.jmo

123.456e3.print
123.456E3.print

123.456e+3.print
123.456E+3.print

123.456e-3.print
123.456E-3.print

"-----".print

123e3.print
123E3.print

123e+3.print
123E+3.print

123e-3.print
123E-3.print

"-----".print

-1.2860082305E-4.print
7.7160493827E-4.print
2.143347051E-5.print
123E3.print
123E-5.print
12.3E3.print

123e-2.print

"-----".print

1.7482E7.print
1.23456789E8.print
123.45E-6.print

"-----".print

( 4294967295l/2 ).print
( 4294967295l/~2 ).print

number_e_notation.jmo

1.12e2.describe
1.12e2b.describe
1.12e2s.describe
1.12e2i.describe
1.12e2l.describe
1.12e2a.describe
1.12e2c.describe
1.12e2f.describe
1.12e2d.describe
1.12e2z.describe

Print

1.12E2.describe
1.12E2b.describe
1.12E2s.describe
1.12E2i.describe
1.12E2l.describe
1.12E2a.describe
1.12E2c.describe
1.12E2f.describe
1.12E2d.describe
1.12E2z.describe

Print

1.125e5.describe
1.125e5i.describe
1.125e5l.describe
1.125e5a.describe
1.125e5c.describe
1.125e5d.describe
1.125e5z.describe

number_neg.jmo

t = Table(2)
[+12b, -12b, +34s,-34s, +56i, -56i, +78l, -78l, +90a, -90a, +23.4c, -23.4c,
+45.6f, -45.6f, 67.8d, -67.8d, 89.1z, -89.1z ]
.each
	t.add( it.toDescribe, it.neg.toDescribe)
t.style("R2::*-*-*-*-*-*-*-*-*-*-*-*-").print

number_style.jmo

12.style("0000").print     #Ergebnis: "0012"
12.style("####").print     #Ergebnis: "  12"
12.style("????").print     #Ergebnis: "12"

-12.style("0000").print    #Ergebnis: "0012"
-12.style("####").print    #Ergebnis: " 12"
-12.style("????").print    #Ergebnis: "12"

1234.style("00").print     #Ergebnis: "1234"

::test(Number n)
	"Test mit: ".add(n).print
	n.style("???").print
	n.style("000").print
	n.style("###").print
	n.style("?0#").print
	n.style("0#?").print
	n.style("#?0").print
	n.style("abc #0 0").print

°test(1)
°test(12)
°test(123)
°test(1234)
°test(-12)
°test(-1234)

number_style_tilde.jmo

n = 12345

n.style("Is this #####~?").print
n.style("a#b#c#d#e#f").print
n.style("a#b#c#d#e#f~").print
n.style("a#b#c#d#e#~f").print
n.style("a#b#c#d#e~#f").print
n.style("a#b#c#d#~e#f").print
n.style("a#b#c#d~#e#f").print
n.style("a~#b#c#d#e#f").print
n.style("~a#b#c#d#e#f").print

number_underlines.jmo

######################################
"=== Hex ===".print

0xabcd.print
0x0abcd.print
0x123.print
0x01230.print

0xa_b_c_d.print
0xabCD.print
0xABCD_EF.print
0xABCD_EF01.print
0xDEAD_BEEF.print

######################################
"=== Oct ===".print

0o1234.print
0o01234.print
0o123.print
0o01230.print

0o1_2_3_4.print
0o1234.print
0o1234_56.print
0o123_401.print
0o73_31_00_70.print

######################################
"=== Bin ===".print

0b1010.print
0b0101.print
0b1011.print
0b01110.print

0b1_0_1_0.print
0b1111.print
0b1111_11.print
0b1111_1101.print
0b1111_1111.print

number_width.jmo

{-1,4}
	n = (it < 0).use(it, 10**(it))

	{0,9}
		it.add(": ").echo
		n.width(it).print

	('-'*20).print

number_with_underline1.jmo

2_3_5_6.print
1____2____345____67___8.print

a = 123_456_789
a.print

number_with_underline4.jmo

123_456.7_8_9.print
1_._2.print
+1d.print
-12_34.5__6_7f.print

number_with_underline_4.jmo

123_456.789.print
1_2_3_4_5_6.7_8_9.print

1_._3.print

object_format.jmo

Print Random.format("|{4>!}|")

l = List
l.add(4,9,2)

"|{}|{}|{}|{}|".fill(l,Random,Table(3),5l).print

Print "-----"

Print l.format("|{}|")
Print l.format("|{s^10}|")
Print l.format("|{10^s}|")
Print l.format("|{^10!}|")

Print "-----"

"|{s^10}|".fill(123).print
"|{10^}|".fill(123).print

# Fehler klar

object_niluse.jmo

::foo(x?)
	x.nilUse(11,22).print
	x.nilUse(cur,cur).print
	x.nilUse(nil,cur+2).print
	"-".print
	x.nilUse(nil.toStr.begin("> ").print, cur.toStr.begin("> ").print)

this.foo(5)
"---".print
this.foo(nil)

object_open_arg_2.jmo

prio=1

(prio == 2 && (Time.hour != 12 || Time.minutes > 5)).print
If(prio == 2 && (Time.hour != 12 || Time.minutes > 5)).print
If( prio == 2 && (Time.hour != 12 || Time.minutes > 5).print )
	it.print

"-----".print

prio=2

(prio == 2).print
If(prio == 2).print

object_output.jmo

123.echo
123.echo(456)

Print "----------"

123.print
123.print(456)

Print "----------"

123.ident
123.ident(456)

Print "----------"

123.describe
123.describe(456)

object_pass_if.jmo

>lazyErrors

A = [ 2, 3, 4 ]
B = [ 2, 3, 4 ]
C = [ 5, 6, 7 ]

####################################################

Try
	A.if.print
.catch.info.print
Try
	A.ifNot.print
.catch.info.print
Try
	A.passIf.print
.catch.info.print
Try
	A.passIfNot.print
.catch.info.print

Print "--------------------------------------------"

Print "1 true"
A.if( true ).print
Print "1 false"
A.if( false ).print

Print "2 true"
A.ifNot( true ).print
Print "2 false"
A.ifNot( false ).print

Print "3 true"
A.passIf(true).print
Print "3 false"
A.passIf(false).print

Print "4 true"
A.passIfNot(true).print
Print "4 false"
A.passIfNot(false).print

Print "--------------------------------------------"

Try
	A.is.print
.catch.info.print
Try
	A.isNot.print
.catch.info.print
Try
	A.passIs.print
.catch.info.print
Try
	A.passIsNot.print
.catch.info.print

Print "--------------------------------------------"

Try
	A.is( A ).print
	A.is( B ).print
	A.is( C ).print
.catch.info.print
Try
	A.isNot( A ).print
	A.isNot( B ).print
	A.isNot( C ).print
.catch.info.print
Try
	A.passIs( A ).print
	A.passIs( B ).print
	A.passIs( C ).print
.catch.info.print
Try
	A.passIsNot( A ).print
	A.passIsNot( B ).print
	A.passIsNot( C ).print
.catch.info.print

Print "--------------------------------------------"

L = [ 3 ,4, 5 ]

Print 1
L.passIf( L.len == 1 ).print
Print 2
L.passIf( L.len == 2 ).print
Print 3
L.passIf( L.len == 3 ).print

Print 12
L.passIf( cur.len == 2 ).print
Print 13
L.passIf( cur.len == 3 ).print
Print 14
L.passIf( cur.len == 3 ).print

object_types.jmo

::test(v)
	v.print
	v.types.print
	('-'*30).print

°test(5)
°test('a')
°test("abcdef")
°test(true)
°test(4.2)

°test(`echo 4`)
°test(Cmd("echo 42").buffer)

°test(Range(1,4))
°test(Count(2,9,3))

°test(Group(5+2*3).get)

objpar_exectime.jmo

2.times.print
"---".print
3.add([6,2,5,1,4,9].each.sub(1).print...).toStr.begin("> ").print
"---".print

vi=3
t=Table(vi)
vi=7
t.add(2,9,4)
t.print
vi.print
"---".print

# TODO: Bis hier korrekt! Rest prüfen!

vi=3
::Tester(a,b)
	c=b+1
	"1 a: {}, b: {}, c: {}".fill(a,b,c).print
	
	::get()
		"2 a: {}, b: {}, c: {}".fill(a,b,c).print
		§= a+2-c

vi.print
Tester(5,vi).print.tee(vi=1).get.print
"---".print

vb=true
While(vb.print).print.tee(vb=false).each.print(7)
"---".print

vb=true
Use(vb,2,4).print.tee(vb=false).get.print
"---".print

vb=true
If(vb).print.tee(vb=false).then.print

open_arg_func_ok2.jmo

::foo
	Return 3

°foo.print

open_arg_func_ok3.jmo

::Foo
	::setTitle(s)
		Print s

F=Foo

F.title = "foo1"

F.setTitle "foo3"
F.setTitle("foo4")

XYZ = "abc"
F.setTitle XYZ

F.setTitle( ["Foo1", "Bar1"] )
F.setTitle ["Foo2", "Bar2"]
F.title = ["Foo3", "Bar3"]

open_arg_type_ok1.jmo

Print 5 + 3 * 9
Print 5 + (3 * 9)
Print ( 5 + 3 ) * 9

Print( ( 5 + 3 ) * 9 )
Print ( ( 5 + 3 ) * 9 )

open_arg_type_ok3.jmo

1.print( 2.print(3) ).print(4)

opt_2020-06-15_table_add.jmo

Try
	Table(0)
.catch.detail.print

"-----".print

t = Table(1)
Try
	t.add('a', 'b')
.catch
	it.message.print
	it.detail.print
t.print

## Bessere Fehlermeldung!

output_without.jmo

Print
Print "---"
Ident
Print "---"
Describe
Print "---"
Echo
Print "---"

override_toStr_toIdent_toDescribe.jmo

# Alles überschreibbar:

::toStr = "RS"
::toIdent = "RI"
::toDescribe = "RD"

this.toStr.print
this.toIdent.print
this.toDescribe.print

Print "------------------------------------"

::Foo
	::toStr = "Foo"
	::toIdent = "Bar"
	::toDescribe = "Bak"

Foo.toStr.print
Foo.toIdent.print
Foo.toDescribe.print

overwrite_1.jmo

::toStr = "Ich bin Root!"
	
°toStr.print
°print
this.print

par-function.jmo

::test(Int a, Int b)
	c=a+b
	(a+"+"+b+"="+c).print

::l
	(30*"-").print

°test(3, 2)
°l
°test(3.times..., 2)
°l
°test(3.print.times..., 2)
°l
°test(2, 2.times...)
°l
°test(3.times.times..., 2)
°l
°test(3.times..., 2.times...)
°l
3.times.print(cur+" <---").times.print; "------".print; °test(3.times.times..., 2.times.print...)
°l
[].add([5].each.print).print
°l
[].add([5,4,2].each.print).print
°l
[].add([5,9,8,7].each...).print
°l
[].add([1.2,3.4,5.6,7.8].each.floor.toInt...).print
°l
d=[1.2,3.4,5.6,7.8]; [].add(d.each.floor.toInt...).print
°l
l=[5,9,8,7]; [].add(l...).print
°l
l=[5,9,8,7]; [].add(l.each...).print
°l
l=[].add([1.2,3.4,5.6,7.8].each.floor.toInt...); l.print

par-function_2.jmo

::test2(a)
	a.print

l=[1,5,9,7,3,8]
# l[3]=l	# Endless circle

°test2(l...)
°test2(l.each...)

parserswitch_class.jmo

> class "java.net.URI"
> class = "java.net.URI"
> ? java.net.URI
>?java.net.URI

Java_URI( "file:///tmp/foo.tmp" ).print

parserswitch_equal.jmo

>prefix = "Foo"

::_Xy
	"foo".print

Foo_Xy.print

parserswitch_low.jmo

# All 3 variations are possible

>low

### Brackets
>prefix( "Bak" )

### Past version:
> prefix = "Foo"

### Open argument:
> prefix "Bar"

### Short version:
>prefix "Bak"

##############################

::_Xyz( Int a )
	Print( a )

Bak_Xyz(123)
_Xyz(456)
Bak_Xyz(789)

parserswitch_open.jmo

# All 3 variations are possible

>open

### Brackets
>prefix( "Bak" )

### Past version:
> prefix = "Foo"

### Open argument:
> prefix "Bar"

### Short version:
>prefix "Bak"

##############################

::_Xyz( Int a )
	Print( a )

Bak_Xyz(123)
_Xyz(456)
Bak_Xyz(789)

parser_switch_open_arg.jmo

>setOutputFile( "/tmp/JayMo-Output_2APvp992Y8wka6Vytxt" )

>setOutputFile "/tmp/JayMo-Output_2APvp992Y8wka6Vytxt"

parse_ignore1.jmo

"1".print

"All ignored".print

parse_ignore2.jmo

"1".print

pathlist_1.jmo

("Cur-Dir: "+Dir).print
('#'*40).print

Dir.list.each.describe
"---".print
Dir.files.each.describe
"---".print
Dir.dirs.each.describe
"---".print
Dir("./test/local/testdir/").files.each.describe

pathlist_2.jmo

Dir.list.each.print
"---".print
Dir.list('*'+"s*").each.print
"---".print

File("datei.txt").toDescribe.print
a="datei.txt"
File(a).toDescribe.print

"---".print

Dir.files("*.LGPL").print
b = ".project"
Dir.files(b).print

"---".print

Dir("/home").toDescribe.print.describe

pathlist_recursive.jmo

D = Dir("./test/local/testdir/")

D.listRecursive.each.describe
Print "---"
D.filesRecursive.each.describe
Print "---"
D.dirsRecursive.each.describe

Print "------------------"

D.listRecursive("*e*").each.describe
Print "---"
D.listRecursive("*1*").each.describe
Print "---"
D.listRecursive("*.txt").each.describe

Print "------"

D.filesRecursive("*b*").each.describe
Print "---"
D.filesRecursive("*e*").each.describe
Print "---"
D.filesRecursive("*.txt").each.describe

Print "------"

D.dirsRecursive("t*").each.describe
Print "---"
D.dirsRecursive("*e*").each.describe
Print "---"
D.dirsRecursive("*2").each.describe

Print "------------------"

D.search().each.print
Print "---"
D.search("*.txt").each.print
Print "---"
D.searchFiles.each.print
Print "---"
D.searchDirs.each.print

path_dir_files_1.jmo

Dir("/home/mike/Prog/JayMo/tests_local/testdir").list.each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").files.each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").dirs.each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").files("f*").each.print
"------------------------".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").list("*t*").each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").files("*t*").each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").dirs("*t*").each.print
"------------------------".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").list("*1").each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").files("*1").each.print
"---".print
Dir("/home/mike/Prog/JayMo/tests_local/testdir").dirs("*1").each.print

pdf_creator.jmo



>prefix "PDFC"

pdf = PDFC_Document

# PAGE 1

page1 = pdf.newPage
page1.newText( 50, 50, "Seite 1" )
page1.newText(50, 75, "Dieser Text ist frei positioniert!")

page1.newText(0, 150, "Dieser Text ist linksbündig")
page1.newText(page1.getWidth() / 2, 150, "Dieser Text ist mittig").alignCenter
page1.newText(page1.getWidth(), 150, "Dieser Text ist rechtsbündig").alignRight

# PAGE 2

page2 = pdf.newPage().setFormat(PDFC_PageSize.A5).setOrientation(true)
page2.newLine(10, 100, 300, 100)
page2.setDefaultFontColor(0, 0, 255)
page2.newText(30, 100, "ABCDEFGH").setFont(PDFC_Font.COURIER).setFontsize(16)
page2.newText(150, 100, "abcdefgh").setFont(PDFC_Font.HELVETICA).setFontsize(32).setColor(255, 0, 0)

# PAGE 3

pdf.newPage().setFormat(PDFC_PageSize.A4).setOrientation(false)#.setDefaultBackground(255, 255, 0)
pdf.newParagraph("Seite 3")

# PAGE 4

pdf.newPage().setOrientation(true).setFormat(PDFC_PageSize.A4)#.setDefaultBackground(255, 0, 255)
pdf.newParagraph("Seite 4")

# PAGE 5

page5 = pdf.newPage().setOrientation(false).setFormat(PDFC_PageSize.A4)#.setDefaultBackground(255, 255, 255)
pdf.newText("Seite5").setBackground(0, 0, 255)
page5.newLine(10, 100, 300, 300).setColor(255, 100, 0)
page5.newLine(100, 80, 200, 80).setColor(255, 100, 255)
page5.newLine(50, 350, 500, 350).setColor(0, 255, 0)

page5.setDefaultThickness(3)

page5.setDefaultLineColor(100, 100, 255).newRectangle(50, 200, 100, 100)
page5.setDefaultFillColor(0, 255, 0).newRectangle(60, 210, 100, 100).setStyle(true, false)
page5.setDefaultFillColor(255, 100, 0).newCircle(200, 200, 50).setStyle(true, false)
page5.setDefaultFillColor(255, 100, 0).newCircle(300, 300, 50).setStyle(false, true)

# PAGE 6

pdf.newPage()
pdf.newText("Dies ist ein Textelement!").setBackground(0, 0, 255)
pdf.newText("Dies ist ein Textelement!").setBackground(255, 0, 0)
pdf.newParagraph("Dies ist ein Absatz")
pdf.newParagraph("Dies ist ein Absatz")

# PAGE 7

page7 = pdf.newPage()
pdf.newText("Seite 7")
page7.newImage( Image(100, 100).fill(255, 100, 100), 100, 100)
page7.newImage( Image(100, 100).fill(100, 255, 100), 200, 200)
page7.newImage( Image(100, 100).fill(100, 100, 255), 300, 100)

# END

pdf.write("/tmp/test123.pdf");
´xo /tmp/test123.pdf´

pipeToCmd_1.jmo

123.´echo´o.describe
3.times.´echo´o.describe

"'foo'".´echo´.describe
"'foo'".´echo´o.describe
"'foo'".´echo´b.describe

pipeToCmd_2.jmo

Dir.files.each.`echo`.print
Print "---"
Dir.files.each.`echo`o.begin('>').print
Print "---"
Dir.files.each.`echo`b.out.print
Print "---"
Dir.files.each.`echo`b.err.print
Print "---"
Dir.files.each.`echo`b.res.print

pipeToCmd_3.jmo

dir = Dir("/home/mike/Prog/JayMo/tests_local/testdir")

dir.files.each.print.´test -f´.print

pipeToCmd_3.jmo

Print "--- 1 ---"
´echo 1´
Print "--- 2 ---"
´("echo 2")´
Print "--- 3 ---"
a="echo 35"
`(a)`
Print "--- 4 ---"
`("echo 4")`
Print "--- 5 ---"
´(a)´

pipeToCmd_4.jmo

a = "'abc'"
a.´echo´o.describe
b = "echo"
321.´(b)´o.describe
231.´("ec"+"ho")´o.describe

position_list_str.jmo

l = [3,8,7,5,4,9,8,7,6,5]
l.searchFirst(8).print
l.searchFirst(7).print
l.searchLast(8).print
l.searchLast(7).print
l.searchLast(6).print
l.searchFirst(3).print
l.searchLast(3).print
l.searchFirst(5).print
l.searchLast(5).print
l.searchLast(0).print

('-'*20).print

s = "reerrerrrr"
s.searchFirst('e').print
s.searchLast('e').print
s.searchFirst("er").print
s.searchLast("er").print
s.searchFirst("rrr").print
s.searchLast("rrr").print
s.searchFirst("uu").print
s.searchLast("uu").print

prefix_1a4.jmo



::Foo_Test
	"foo".print
	
::Bar_Test
	"bar".print

::Test
	"main".print

Foo_Test.type.print
Bar_Test.type.print

Test.type.print

prefix_1d.jmo



>prefix("Anw")

::Foo_Test
	"foo".print
	
::Bar_Test
	"bar".print

::_Test
	"pre".print

::Test
	"main".print

Foo_Test.type.print
Bar_Test.type.print
_Test.type.print
Test.type.print

prefix_2a.jmo

>prefix("Swing")

al = Java("ArrayList")
al.toString.print
al = Java_ArrayList
al.toString.print

c = Count(3)
c.print

prefix_2b.jmo

>prefix()

al = Java("ArrayList")
al.toString.print
al = Java_ArrayList
al.toString.print

c = Count(3)
c.print

print.jmo

b= 5.print
b.print

c= 5.print('a')
c.print

d= 5.print('b')
d.print

print_echo.jmo

Print( 123 )
Print( 'a'++3, "lkj", 234 )
Print('a'++3, "lkj", 234).print
Print('a'++3, "lkj", 234).toStr.print

"----------".print

Echo( 123 )
Echo( 'a'++3, "lkj", 234 )
Echo('a'++3, "lkj", 234).print
Echo('a'++3, "lkj", 234).toStr.print

proc-tee_memlet.jmo

123.ident.proc( :a.ident, (3*a).ident ).ident
Print
456.ident.proc( :B.ident, (3*B).ident ).ident
Print "---------------"
234.ident.tee( :c.ident, (3*c).ident ).ident
Print
567.ident.tee( :D.ident, (3*D).ident ).ident

proc-tee_withpar.jmo

1.proc(cur+2).print
3.tee(cur+4.print).print

b=[]; [5..9].unfold.each.mem(:a).proc(b.add(a*2)); b.print

1.proc(cur+2).pass
	it = it+3
.print

#####

3.proc(cur+4.print).pass
	it = it+5.print
.print

3.tee(cur+4.print).pass
	it+5.print
.print

proc.jmo

"bla".pass
	it = (it * 3).sub('l')
.print

a= "abc".pass
	it = it.add("def").print
a.print

b = "uvw".pass
	it = it.add("xyz").print
.print

b.print

proc2.jmo

"bla".pass
	it = it.charAt(2).caseUp.print + it.print	# Fehler! Soll: "Lbla"
.print

proc3.jmo

::proX( VarLet vl? = nil, Object o )!! Object
	§.init( 1 )
	§.init( 2, this )
	result = ( o.type ==~ "FuncLet" ).use( o.exec( this ), o )
	§.push( result )
	§ = result

::func( Object o ) Str
	§ = o.toStr.begin('X')

this.proc( cur.toStr.begin('X') ).echo( "1a: " ).print
this.proc( :x, x.toStr.begin('X') ).echo( "1b: " ).print
this.proc( :{°func} ).echo( "1c: " ).print

"----------".print

this.tee( cur.toStr.begin('X') ).echo( "2a: " ).print
this.tee( :x, x.toStr.begin('X') ).echo( "2b: " ).print
this.tee( :{°func} ).echo( "2c: " ).print

"----------".print

this.proX( cur.toStr.begin('X') ).echo( "3a: " ).print
this.proX( :x, x.toStr.begin('X') ).echo( "3b: " ).print
this.proX( :{°func} ).echo( "3c: " ).print

proc_varlet.jmo

t11 = [1,2,3]
t12 = [4,5,6]

t12.each.proc( cur.mem(:a).proc( t11.add(a))).print
t11.print
t12.print

"---".print

t21 = [1,2,3]
t22 = [4,5,6]

t22.each.proc( :a, t21.add(a) ).print
t21.print
t22.print

"---".print

t31 = [1,2,3]
t32 = [4,5,6]

t31.add( t32.each... ).print
t31.print
t32.print

"---".print

t41 = [1,2,3]
t42 = [4,5,6]

t41.addAll(t42 ).print
t41.print
t42.print

properties_1.jmo

file = File("/tmp/test.properties")
prop = PropertiesFile( "Test", file )

prop.write
prop.read

prop.setBool( "Bool", true )
prop.setInt( "Int", 123 )
prop.setStr( "String", "foo" )

Print "------"
prop.getBool( "bool" ).print
Try
	prop.getInt( "bool" ).print
.catch.info.print
prop.getStr( "bool" ).print
Print "---"
prop.getBool( "int" ).print
prop.getInt( "int" ).print
prop.getStr( "int" ).print
Print "---"
prop.getBool( "string" ).print
Try
	prop.getInt( "string" ).print
.catch.info.print
prop.getStr( "string" ).print
Print "------"

prop.getBool( "abc", false ).print
prop.getInt( "def", 101 ).print
prop.getStr( "ghi", "qwe" ).print
Print "------"

prop.write
prop.read
prop.getBool( "bool" ).print
prop.getInt( "int" ).print
prop.getStr( "String" ).print

prop.close

file.delete

property_1.jmo

d = Date(2020,4,7)
d.print

d.setDay(9).print
d.getDay.print

d.day = 5
(d.day = 5).print
d.day.print

(d.day=1).print
d.day.print

d.day(1).print
d.day.print

d.print

property_2.jmo

::Foo
	a = 5
	
	::setValue(v)
		a = v
		
	::getValue = a
	

f = Foo

Print "---"
f.value = 3
f.value.print

Print "---"
f.value = 9
f.value.print

Print "---"
f.setValue(1)
f.getValue.print

Print "---"
f.value(4).print
f.value.print

property_3.jmo

::Foo
	a = 10
	
	::setValue(b)
		a = b
		§=°
		
	::setAB(b)
		a = b
		§=°
		
	::setX(c)
		c.print
		
	::set(d, e)
		e.print
		d.print
		
	::getValue
		§=a

######################################

Foo.setValue(1).getValue.print
"---".print
(Foo.value=2).value.print
"---".print
f = Foo
(f.aB=3).value.print
"---".print
(Foo.aB=3).value.print
"---".print
(Foo.x=4).print
"---".print
Foo.set(6, 5).print
"---".print
(Foo[7]=8).print

property_4.jmo

::getProp(a=1)
	§ = "Get: "+a * 7

::setProp(a)
	a.toStr.begin("Set: ").print

°setProp( 'x' )

°getProp().print
°getProp.print
°getProp(4).print

"-----".print

°prop.print
°prop(2).print
°prop = 2

"----------".print

t = Table(2)
t.add(1,2).add(3,4).add(5,6)
t.column(1).print
t.column(1).print

"----------".print

::getPX(a=1) = "pxGet: "+a
::setPX(x)
	x.toStr.begin("pxSet: ").print

°pX.print
°pX(2).print
°pX = 9

pts-import-string.jmo

>> /home/mike/git/jaymo/JayMo/test/local/include/lib.jmo		#Fooo
>> "/home/mike/git/jaymo/JayMo/test/local/include/lib.jmo"	#Fooo

>include("/home/mike/git/jaymo/JayMo/test/local/include/lib.jmo")	#Fooo
>include("/home/mike/git/jaymo/JayMo/test/local/include/lib.jmo", "/home/mike/git/jaymo/JayMo/test/local/include/lib.jmo")	#Fooo
>* org.jaymo_lang.parser
>* "org.jaymo_lang.parser"

>package "org.jaymo_lang.parser"
>package("org.jaymo_lang.parser")
>package("org.jaymo_lang.parser", "org.jaymo_lang.parser")

"Root".print

quicksort.jmo

::qsort1(List l) List
	( l.len <= 1 )
		§ = l
	p = l.first
	r = l.start(2)
	a = °qsort1( r.filter( each <= p ) )
	b = °qsort1( r.filter( each > p ) )
	§ = a.add(p).concat(b)

::qsort2(l)
	( l.len <= 1 )
		§ = l
	p = l[1]
	r = l.start(2)
	§ = °qsort2( r.filter( each <= p ) ).add(p).concat( °qsort2( r.filter( each > p ) ) )

::qsort3(l)
	(l.len<=1).if.proc(§=l)
	§=°qsort3(l.start(2).filter(each<=l[1])).add(l[1]).concat(°qsort3(l.start(2).filter(each>l[1])))

tl = [16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19]
°qsort1(tl.print).print
°qsort2(tl.print).print
°qsort3(tl.print).print

quicksort_steps.jmo

curType = "test"
line = " case xyz       "
(curType.length.print > 0 && line.trim.print.startsWith("case ")).print
(curType.length.print < 0 && line.trim.print.startsWith("case ")).print

a = [1,2,3]
b = [6,7,8]
c = a ++= b
a.print
c.print

list = [16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19]
a = list.filter( each < list[1] )
b = list.filter( each >= list[1] )
a.print
b.print
list.print
(a ++ b).print

random.jmo

Random.int(999,999).print
Random.int(5,5).print

10.times
	b=Random.int
	c=Random.int(5)
	d=Random.int(7,9)
	a=Random.int(100,999)
	
	(a.isBetween(100,999) && c.isBetween(1,5) && d.isBetween(7,9)).print

randomaccessfile_1.jmo

f = File("/tmp/foo.temp")
f.touch
raf = f.toRandomAccess("rw").describe
raf.writeByte(123b)
raf.flush
raf.close

f.exists.print
f.read.print
f.delete.print

randomaccess_1.jmo

file = "/tmp/jmo_test_randomaccessfile.txt"

File(file).clear.directWrite.pass
	it.writeByte(1b)
	it.writeByte(2.toByte)
	it.writeByte(3b)
	it.seek(1)
	it.readByte.print	#1
	it.readByte.print	#2
	it.writeInt(1234567)
	it.seek(3)
	it.readInt.print		#1234567
	it.seek(6)
	it.writeByte( 0x88.toByte )
	it.seek(3)
	it.readInt.print		#
	it.seekEnd
	it.write(123)
	it.try
		it.write(256)
	.catch.info.print
	it.write(255)
	it.writeBytes( 1b,3b,5b )
	
	it.seek(15)
	it.write(64)
	it.writeString("a›c", true)
	it.writeString("d›f", false)
	it.seek(15)
	it.readString(1+3+3+2, true).print
	it.seek(15)
	it.readString(1+3+3+2, false).print
	
	it.seekStart
	it.write(129)
	it.seekStart
	it.read.print
	it.seekStart
	it.readByte.print
	
	"--------------------".print
	#it.len.print
	#it.getLen.print
	#it.length.print
	#it.getLength.print
	it.size.print
	#it.getSize.print

	it.seekStart
	it.readBytes(it.size).print
		
	it.close
	it.try
		it.size.print
	.catch.info.print
	
	"--------------------".print

RandomAccessFile( File(file),"r" ).pass
	it.size.print
	it.close.print

random_2.jmo

(1..9).compute.print
(9..1).compute.print
('e'..'t').compute.print
('C'..'5').compute.print

"---".print

Random.char("G").print
Random.char("t").print
Random.char('4').print
Random.char(5).print
Random.char('+').print
Random.char(",").print
Random.char('k'..'k').print

"---".print

Random.str(10, "a").print
Random.str(10, 7).print
Random.str(10, 'J').print
Random.str(10, 'H'..'H').print

"---".print

Try
	Random.char(5.32).print
.catch.message.print
Try
	Random.char(111..999).print
.catch.message.print
Try
	Random.str(12.34).print

.catch.message.print
Try
	Random.str(10, 12.34).print
.catch.message.print
Try
	Random.str(10, 12345).print
.catch.message.print

range-list.jmo

3..15.each.echo; "".print
3..15.print.each.echo; "".print

[3,6,9,1].each.echo; "".print
[3..7].unfold.each.echo; "".print
[4..12].unfold.each.echo; "".print
[4..10].unfold.each.echo; "".print
[2..10].unfold.each.echo; "".print
[2..10,2].unfold.each.echo; "".print
[5..30,7].unfold.each.echo; "".print

a=5
[2..a].unfold.each.echo; "".print
[a..7].unfold.each.echo; "".print
a=4
[a..a].unfold.each.echo; "".print
[3..a, 6].unfold.each.echo; "".print

3..15.each.echo; "".print
('a'..'z').toList.set('-',4).each.echo;"".print

ranges.jmo


5..9.print
(5..9).print

[1..6].unfold.print
[1..6].unfold.print.type.print

# Liste
[1..5].type.print
ll=[1..5].unfold
ll.type.print
ll.each.print

# Count {}
{1..5}.type.print
Print "---"
{1..5}
	it.type.print

# Count
Count(1..5).type.print
ff=Count(1..5)
ff.type.print
ff.each.print

e=4
f=7
Range(e,f).toCount.type.print
Range(e,f).toCount.each.print

Count(1,5,2).each
	it.print
Count(1,5,2)
	it.print

Range(3,6).each
	it.print
Range(4,7)
	it.print

1..3.type.print
1..3.toList.type.print
1..3.each.print

3..1.print
3..1.print(9)
3..1.each.print('-')

[2..10,2,1..3].unfold.print
[2..10,2,1..3].type.print

[3,8,5].each
	it.print

	
[1,2,3]
	it.print
	
[2..10,2,1..3].unfold.each
	it.print
.print

range_2.jmo

a=4
b=9
[a..b].unfold.each.print

['a'..'f'].unfold.each.echo; "".print

(6..9).contains(3).print
(6..9).contains(6).print
(6..9).contains(7).print
(6..9).contains(9).print
(6..9).contains(10).print

range_3.jmo

r = 1.5..8.9
r.print

r.each
	it.print

range_4.jmo

Range(10).print
Range(10).toList.print
Range(5, 10).toList.print
Range(5, 10).each.print

"---".print

[Range(4)].print.unfold.print
[1..4].print.unfold.print

"-----".print

a = ["Mary", "had", "a", "little", "lamb"]

a.each.print

"-".print

a.len.times
	"{} {}".fill(it, a[it]).print

"-".print

Count( a.len )
	( it + ' ' + a[it] ).print

"-".print

a.len.times.proc(:x, x + ' ' + a[x]).print

range_5.jmo

Range('a', 'c').print
'a'..'c'.print

Range('a', 'c').each
	Print it

Range('a', 'c') \\ a
	Print a

Range('a', 'c')
	Print it

'a'..'c'
	it.print

"----------------------------------------------".print

Range(1, 3).print
1..3.print

Range(1, 3).each
	Print it

Range(1, 3) \\ a
	Print a

Range(1, 3)
	Print it

1..3
	it.print

"----------------------------------------------".print

Range(1.2, 3.4).print
1.2..3.4.print

Range(1.2, 3.4).each
	Print it

Range(1.2, 3.4) \\ a
	Print a

Range(1.2, 3.4)
	Print it

1.2..3.4
	it.print

"==============================================".print

Range('c', 'a').print
'c'..'a'.print

Range('c', 'a').each
	Print it

Range('c', 'a') \\ a
	Print a

Range('c', 'a')
	Print it

'c'..'a'
	it.print

"----------------------------------------------".print

Range(3, 1).print
3..1.print

Range(3, 1).each
	Print it

Range(3, 1) \\ a
	Print a

Range(3, 1)
	Print it

3..1
	it.print

"----------------------------------------------".print

Range(4.3, 2.1).print
4.3..2.1.print

Range(4.3, 2.1).each
	Print it

Range(4.3, 2.1) \\ a
	Print a

Range(4.3, 2.1)
	Print it

4.3..2.1
	it.print

range_redesign.jmo

3..9.print

2..5
	it.print

rnd = Random.str(10, 'a'..'z', 'A'..'Z')
rnd.len.print

"-----".print

3..9
	it.print

"-----".print
(3..9).each => x
	x.print

"------------------".print
7..9 => xy
	a1 = it
	4..2 => ab
		a2 = it
		"{} {} {} {}".fill(xy,ab,a1,a2).print
"------------------".print
{7..9} => yz
	a1 = it
	{4..2} => ab
		a2 = it
		"{} {} {} {}".fill(yz,ab,a1,a2).print

regex_1.jmo

"^[c-k]$"l.print

str = "^[a-z]$"l
str.print
regex = RegEx("^.*$")
regex.print

str = "^[g-u]$"l

str.toRegEx.match("g").print
str.toRegEx.match("v").print
str.toRegEx.match("gustav").print

regex_2.jmo

RegEx("l").replace("Hello JM°", 5).print
RegEx("l").replace("Hello JM°", 'x').print
RegEx("l").replace("Hello JM°", "++").print

RegEx("\s"l).replace("Hello JM°", "-").print

"Hello".match("H[a-z]+"r).print
"Hello".match("H[a-z]+"l.toRegEx).print

regex_3.jmo

"ab\nde\ngh".print.type.print
"-----".print
"ab\nde\ngh"l.print.type.print
"----------".print
"ab\nde\ngh".toRegEx.print.type.print
"-----".print
"ab\nde\ngh"l.toRegEx.print.type.print
"-----".print
"ab\nde\ngh"r.print.type.print
"-----".print

"ab\nde\ngh"r.print.type.print

regex_backslash.jmo

l = "bla( test )	 bar"

l.replace( RegEx("\(.*$"l), "" ).print

l.replace( RegEx("\s*\)\s*"l), "" ).print

"case  	\"foo".replace(RegEx("^case\s*\""l), "-").print

repeat.jmo

i = 0
Repeat(i < 3)
	i.print
	i=++

"=====".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 2)
		loop.next
	i.print

"-----".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 2)
		Next
	i.print

"-----".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 2)
		Next
	i.print

"=====".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 3)
		Break
	i.print

"-----".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 3)
		Break
	i.print

"-----".print

i = 0
Repeat(i < 5)
	i=++
	If(i == 3)
		Break
	i.print

"=====".print

::test1
	i = 0
	Repeat(i < 5)
		If(i == 3)
			Return
		i.print
		i=++
°test1.print

"-----".print

::test2
	i = 0
	Repeat(i < 5)
		If(i == 3)
			Return(5)
		i.print
		i=++
°test2.print

"=====".print

Repeat(false)
	"repeat".print

While(false)
	"while".print

result_to_autoblock.jmo

# Functions, that returns a object with auto-block-do:

'o'..'t'
	it.inc(6).print

5s..9
	it.echo(it.type).print

3l..6b
	it.echo(it.type).print

2b..5l
	it.echo(it.type).print

2d..5f
	it.echo(it.type).print

9c..6c
	it.echo(it.type).print

2.4..5.9
	it.echo(it.type).print

1f..4d
	it.echo(it.type).print

10.divisible.each
	it.echo(it.type).print

10l.divisible.each
	it.echo(it.type).print

(4..9).print(cur.type).each
	it.echo(it.type).print

(4..9).toCount.print(cur.type).each
	it.echo(it.type).print

"--- Result = List ---".print

"--- Table".print

t=Table(2).add(4,9).add(1,7).print
t.each
	it.echo(it.type).print
t.each.each
	it.print
t.print
t.get(2).print.each
	it.echo(it.type).print

"--- Range".print

(3..7).toList.each
	it.echo(it.type).print
	
"--- Map".print

m = Map
m.add('a', 4).add('b',2).add('c',9)
m.print
m.select('c','a').print(cur.type).print.each
	it.print

"--- List".print

l=[4,5,6]
l.fixLength.each
	it.print
l.fixTypes.each
	it.print

l=[2,3,4]
l.add(6).each
	it.print
l.add(6,7,8,9).each
	it.print
.print
l.print

l.part(2,3).each
	it.echo(it.type).print
	
l.concat([10,11]).each
	it.print
	
l.cut(3,2).each
	it.echo(it.type).print

l.filter(each == 7).each
	it.print

l.print
l.start(7).each
	it.print

l.end(3).each
	it.print

l.left(2).each
	it.print

l.right(2).each
	it.print

l.only(1,5,6,7,8).each
	it.print

l.remove(6, 8).each
	it.echo(it.type).print

l.delete(3).each
	it.echo(it.type).print

[15,16,17,18].print.clear.each
	it.print

l.print
l.reverse.each
	it.print

[9].shuffle.each
	it.print

l.print
l.set(20,2).each
	it.print

l.sort.each
	it.echo(it.type).print

l.print
l.add(4,6,7,6,9,0,6,4)
l.print
l.uniq.each
	it.print

l.insert(30,2).each
	it.echo
"<".print

"--- String".print

"123\n45\n6789\n0".lines.each
	it.print

"23487564624092436754293847".group(4).each
	it.print
"---".print

"23487564624092436754293847".split('4').each
	it.print
"---".print

"23487564624092436754293847".split("4").each
	it.print
"---".print

"23487564624092436754293847".split(RegEx("[04]"l)).each
	it.print
"---".print

"23487564624092436754293847".splitKeep('4').each
	it.print

"--- Count".print

Count(4,9).toList.each
	it.print

"--- Cmd-Result".print

Cmd("echo \"5\n3\n2\"").buffer.out.lines.each
	it.print

"--- Table".print

t=Table(2)
t.add(3,5).add(9,6).add(0,3).add(6,7).add(3,2).add(3,3)
t.search(3).each
	it.print
t.searchFirst(6).each
	it.print

"--".print
Table(2).add(1,2).each
	it.print

"--- Map".print
m=Map
m.add(3,'a').add(2,'z')
m.print
m.add(5,'f').add(6,'x').each
	it.print

Try
	m.add(2, 't')
.catch
	it.message.print

m.sub(2).each
	it.print

"---".print
m.set('y',5).each
	it.print

"---".print
m.copy.each
	it.print

"-".print
m.keys.each
	it.print
m.values.each
	it.print

"---".print
m.clear.each
	it.print
"---".print

"-------------------".print

[4,6,1].copy.each
	it.print

[3,2,7,8,10].filter(each>=7).each
	it.print

[9,3].store(:x,:y).each
	it.print
(x+" - "+y).print

"---".print

[5,3,1,7].remove(1).print
[5,3,1,7].remove(3).print
[5,3,1,7].delete(1).print
[5,3,1,7].delete(3).print

return_1.jmo

::foo1
	a=5
	b=5
	(a==b)
		"Run 1".print
		§= (a+b).print
		"Foo".print
	"foo".print

::foo2
	(true)
		"Run 2".print
		§= 3+1
		"Foo".print
	"foo".print

::foo3
	(true)
		"Run 3".print
		it.print
		§= it
		"Foo".print
	"foo".print

°foo1.print
°foo2.print
°foo3.print

return_2.jmo

::foo6
	"Run 6".print
	§= 3+1
	"foo".print

::foo7
	"Run 7".print
	§= 3+1
	"foo".print

°foo6.print
°foo7.print

return_3.jmo

::test1
	§= "bla"

°test1.print

####################################

::test2(Int a, Int b)
	§= (b-a)*b+a

°test2(2,4).print		#10

####################################

::test3(Int a)
	(a==1)
		§= "Eins"
	(a==2)
		§= "Zwei"
	(a==3)
		§= "Drei"
	"Sonstwas"

°test3(2).print
°test3(3).print
°test3(7).print
(°test3(1)).print

return_4.jmo

For(i=1, i<9, i=++)
	If(i==4)
		Next
	If(i==6)
		Break
	Echo( (i==1).use("",',') +i )
Print

::foo
	Return(8)

Print("-----")
Print(this.foo)

return_new.jmo

::test11
	§= 11

::test12
	§= 12

::test13
	§= 13

::test14
	§return(14) #§end(14)

::test21
	func.return(21) #func.end(21)

::test22
	func=22

::test23
	func=23

::test24
	func= 24

°test11.print
°test12.print
°test13.print
°test14.print

°test21.print
°test22.print
°test23.print
°test24.print

return_nil.jmo

::test1(a) Int
	§ = a

::test2(a?) Int
	§ = a?

::test3(a?) Int?
	§ = a?

####################	
	
°test1(1).print
°test2(2).print
°test3(3).print

"---".print

Try
	°test1(nil).print
.catch.detail.print
Try
	°test2(nil).print
.catch.detail.print
Try
	°test3(nil).print
.catch.detail.print

"---".print

Try
	°test1('a').print
.catch.detail.print
Try
	°test2('a').print
.catch.detail.print
Try
	°test3('a').print
.catch.detail.print

return_to_exit.jmo

::foo5
	(true)
		"Run 5".print
		app.exit
		"Foo".print
	"foo".print

°foo5.print

rgb_1.jmo

rgb = ColorRGB(0,0,0)

rgb.print
rgb.red.print
rgb.green.print
rgb.blue.print

rgb = ColorRGB(255,255,255)

rgb.print
rgb.red.print
rgb.green.print
rgb.blue.print

rgb = ColorRGB(63,191,127)
rgb.toHtml.print

#####################################

Try
	rgb = ColorRGB(300,300,300)
.catch.message.print
Try
	rgb = ColorRGB(-1,-1,-1)
.catch.message.print

rgb_hsv_hsl.jmo

::test( Str name, ColorRGB rgb )
	hsv = rgb.toHSV
	hsl = rgb.toHSL
	
	s = name.width(17)
	s += " | HSV: {3}° {3}% {3}%".fill(hsv.hue, hsv.saturation.mul(100).round, hsv.value.mul(100).round)
	s += " | HSL: {3}° {3}% {3}%".fill(hsl.hue, hsl.saturation.mul(100).round, hsl.lightness.mul(100).round)
	s += " | RGB: {3}% {3}% {3}%".fill(rgb.red.mul(100).div(255).round, rgb.green.mul(100).div(255).round, rgb.blue.mul(100).div(255).round)
	s.print

tab = ||||
"Rot",255,0,0
"Orange",255,127,0
"Gelb",255,255,0
"Dunkelgrün",0,127,0
"Violett",127,0,255
"Schwarz",0,0,0
"Blau",0,0,255
"Braun",92,46,23
"Weiß",255,255,255
"Grün",0,255,0
"Cyan",0,255,255
"Magenta",255,0,255
"Blaugrün",0,255,127
"Grünblau",0,127,255
"Grüngelb",127,255,0
"Blaurot",255,0,127
"Zinnober",255,63,0
"Indigo",63,0,255
"Leichtes Blaugrün",0,255,63
"Blaucyan",0,191,255
"Leichtes Grüngelb",191,255,0
"Rotmagenta",255,0,191
"Safran",255,191,0
"Blaumagenta",191,0,255
"Grüncyan",0,255,191
"Leichtes Grünblau",0,63,255
"Limett",63,255,0
"Leichtes Blaurot",255,0,63
|||| => tab

tab.each
	#it.print
	°test(it[1], ColorRGB(it[2],it[3],it[4]))

ruby_functions_1.jmo


#############################

numbers = [1, 2, 3]
language = "JM°"

Print numbers.first			# => 1
Print numbers.last			# => 3
Print numbers.isEmpty		# => false
Print numbers.isEmpty.not	# => true
Print language.first		# => J
Print language.last			# => °
Print language.isEmpty		# => false
Print language.isEmpty.not	# => true
Print language.isBlank		# => false

select_update.jmo

l = Range('a', 'f').toList
l.select(3,2,6).print
l.update('x', 3, 2, 6).print
l.print

"-----".print

l = Range('a', 'f').toList
l.selectLazy(3,9,6,7).print
l.updateLazy('y', 3, 9, 6, 7).print
l.print

"-----".print

l = Range('a', 'f').toList
l{3,2,6}.print
(l{3,2,6} = 'x').print
l.print

"-----".print

l = Range('a', 'f').toList
l{3,9,6,7}?.print
(l{3,9,6,7}? = 'x').print
l.print

select_update_1.jmo

l = ('a'..'i').toList
l.describe

l.select.describe
l.select( 3 ).describe
l.select( 2,4,6 ).describe
l.selectLazy( 3,6,9,12,15 ).describe

"-----".print

t = Table(2)
t.add(1,2).add(3,4).add(5,6)
t.describe

t.select.describe
t.select( 3 ).describe
t.select( 2,1 ).describe
t.selectLazy( 1,3,5,7 ).describe

"-----".print

m = Map
m.add('a', 1).add('b', 2).add('c', 3)
m.describe

m.select.describe
m.select( 'c' ).describe
m.select( 'b','a' ).describe
m.selectLazy( 'a','c','x' ).describe

select_update_2.jmo

C = 'a'
C.select(1,-1).print
C.selectLazy(1,4,-2).print

S = "abcdefgh"
S.select(4,8,2,-2).print
S.selectLazy(2,4,16,5,-12).print

L = [2,4,6,8]
L.select(4,1,2,-2).print
L.selectLazy(2,4,16,4,-12).print

"---------------".print

C2 = 'a'
C2.update('x', 1,-1).print
C2.updateLazy('y', 1,4,-2).print

S2 = "abcdefgh"
S2.update('x', 4,8,2,-2).print
S2.updateLazy('y', 2,4,16,5,-5).print

L2 = [2,4,6,8,1,3,5,7]
L2.update(11, 4,8,2,-2).print
L2.updateLazy(12, 2,4,16,5,-5).print

select_update_map.jmo

m = Map
m.add('a', 3)
m.add('b', 7)
m.add('c', 4)
m.add('d', 1)
m.print

"### Select ###".print
m.select('c','a','d').print
m{'c','a','d'}.print

m.selectLazy('c','x','r','a').print
m{'c','x','r','a'}?.print

"### Update ###".print
m.update(10, 'c','a','d').print

m{'c','a','d'} = 11
m.print

m.updateLazy(12, 'c','s','d','u').print

m{'c','s','d','u'}? = 13
m.print

select_update_table.jmo

t = Table(3)
t.add('a', 3, 9)
t.add('b', 7, 2)
t.add('c', 4, 5)
t.add('d', 1, 8)
t.print

"### Select ###".print
t.select(3,2,4).print
t{3,2,4}.print

t.selectLazy(3,2,9,7,1).print
t{3,2,9,7,1}?.print

"### Update ###".print
t.update([10,11,12], 2,4).print
"-----".print
t{2,4} = [20,21,22]
t.print
"-----".print
t.updateLazy([30,31,32], 1,6,3).print
"-----".print
t{1,6,3}? = [40,41,42]
t.print

select_update_tree.jmo

t = >>>>
	foo = 2
		blo = 3
	tra = 4
		bla = 5
	wer = 7
		ber = 8
<<<<.print

"### Select ###".print
t.select("wer","foo").print
t{"wer","foo"}.print

t.selectLazy("tra","zet").print
t{"tra","zet"}?.print

"### Update ###".print
t.update(10, "tra","foo").print
"-----".print
t{"tra","foo"} = 11
t.print
"-----".print
t.updateLazy(12, "tra", "vol").print
"-----".print
t{"tra","vol"}? = 13
t.print

selftype_name.jmo

::Uff
::Bla
::Foo

Uff.type.print
Bla.type.print
Foo.type.print

semikolon.jmo

(2+3).print;3.print
(2+3+7.print+2+1).print;3.print

sequence_content.jmo

List l = [3,6,8]l
l.print
l.content(4,5,5)
l.print

Print '-'*80

Set s = [3,6,8]s
s.print
s.content(4,5,7)
s.print

Print '-'*80

ByteArray b = [6,7,8]b
b.print
b.content(4,5,7)
b.print

Print '-'*80

c = Macro
c.add(:{'a'.print})
c.add(:{'b'.print})
c.add(:{'c'.print})
c.print
Print
c.content(:{'x'.print}, :{'y'.print}, :{'z'.print})
c.print

Print '-'*80

t = ||||
1,2,3
4,5,6
7,8,9
||||
t.print
Print
t.content([9,8,7],[6,5,4],[3,2,1])
t.print

Print '-'*80

m = Map
m.add('a', 123)
m.add('b', 345)
m.add('c', 564)
m.print
Print
m.content('x'->987, 'y'->876, 'z'->765)
m.print

r = >>>>
node1
	node2
		node3
	node4
		node5
		node6
<<<<
r.print
r.content(r.get("node1").last)
r.print
r.content(r.nodes[2])
r.print

sequence_equals.jmo

::test( Sequence base, Sequence equal, Sequence lazy, Sequence diff )
	Print "===== " + base.type + " ====="

	Echo ( base === base ).use( "Y", "-" )
	Echo ( base === equal ).use( "Y", "-" )
	Echo ( base === lazy ).use( "Y", "-" )
	Print ( base === diff ).use( "Y", "-" )

	Echo ( base == base ).use( "Y", "-" )
	Echo ( base == equal ).use( "Y", "-" )
	Echo ( base == lazy ).use( "Y", "-" )
	Print ( base == diff ).use( "Y", "-" )

	Echo ( base ==~ base ).use( "Y", "-" )
	Echo ( base ==~ equal ).use( "Y", "-" )
	Echo ( base ==~ lazy ).use( "Y", "-" )
	Print ( base ==~ diff ).use( "Y", "-" )

######################################################################

listB = [1,2,3,4,5]
listE = [1,2,3,4,5]
listL = [true,'2',"3",4,5.0]
listD = [1,2,4,4,5]
this.test( listB, listE, listL, listD )

setB = [1,2,3,4,5]s
setE = [1,2,3,4,5]s
setL = [true,'2',"3",4,5.0]s
setD = [1,2,6,4,5]s
this.test( setB, setE, setL, setD )

tabB = ||||
1,2,3
4,5,6
||||
tabE = ||||
1,2,3
4,5,6
||||
tabL = ||||
true,2,'3'
4,"5",6
||||
tabD = ||||
1,9,3
4,5,6
||||
this.test( tabB, tabE, tabL, tabD )

treeB = Tree
treeE = Tree
treeL = Tree
treeD = Tree
this.test( treeB, treeE, treeL, treeD )

baB = ByteArray(5)
baB[3] = 9b
baE = ByteArray(5)
baE[3] = 9b
baL = ByteArray(5)
baL[3] = 9b
baD = ByteArray(5)
baD[2] = 8b
this.test( baB, baE, baL, baD )

mapB = Map
mapB.add( 'a', 123 )
mapB.add( 'b', 234 )
mapE = Map
mapE.add( 'a', 123 )
mapE.add( 'b', 234 )
mapL = Map
mapL.add( "a", 123 )
mapL.add( 'b', 234l )
mapD = Map
mapD.add( 'a', 123 )
mapD.add( 'b', 243 )
this.test( mapB, mapE, mapL, mapD )

makroB = Macro
makroB.add( :{'a'.add(1)} )
makroB.add( :{'b'.add(2)} )
makroE = Macro
makroE.add( :{'a'.add(1)} )
makroE.add( :{'b'.add(2)} )
makroL = Macro
makroL.add( :{"a".add(1)} )
makroL.add( :{'b'.add('2')} )
makroD = Macro
makroD.add( :{'c'.add(1)} )
makroD.add( :{'b'.add(2)} )
this.test( makroB, makroE, makroL, makroD )

sequence_fill.jmo

S = "|{} - {}|"

S.fill(12,34).print

List(12,34).fill(S).print
List(12,34).format(S).print
S.fill(List,34).print

sequence_select_nil.jmo

tab = Table( 5 )

map = Map
map.add( "order_id", "12345678" )
map.add( "from", "Foo" )
map.add( "rating", 0 )
map.add( "comment", "Great!" )
map.add( "paymant", "onsite" )

tab.add( map.select( "order_id", "from", "rating", "comment", nil ).toTempLet )
tab.describe

"---------------".print

tab.select(1,nil,1).describe

[11,22,33,44,55].select(nil,3,nil,1,4,nil).describe

ba=ByteArray(5)
ba[1] = 11b
ba[2] = 22b
ba[3] = 33b
ba[4] = 44b
ba[5] = 55b
ba.select( nil,3,nil,1,4,5 ).describe

sequence_toStr.jmo

::Test( o? )
	Print '~' * 70
	Print o.toStr
	Print '-' * 10
	Print o.toIdent
	Print '-' * 10
	Print o.toDescribe

Test nil
Test true
Test 1b
Test 2s
Test 3i
Test 4l
Test 7.0c
Test 5.0f
Test 6.0d
Test 'a'
Test "bcd"

list = [ true, 1, 2b, 'a', "bcd", [1b,2.3], [1s,2l]s ]
Test list

set = [ true, 1, 2b, 'a', "bcd", [1b,2.3], [1s,2l]s ]s
Test set

table = ||||
true, 1b, 2
3s, 4l, 'a'
"bcd", [5b], 6.0
'e',7s,[]
||||
Test table

tree = >>>>
html
	body
		div
			margin-top: "30px"
			margin-left: "40px"
		table
			border: "solid 1px #333"
		list: [1b,2s,3i,4l]
<<<<
Test tree
Test tree$html$body

bytes = ByteArray(5)
bytes[1] = 11b
bytes[2] = 12b
bytes[3] = 13b
bytes[4] = 14b
bytes[5] = 15b
Test bytes

kv = "foo" -> 123
Test kv

map = Map
map.add( "abc", 1234s )
map.add( "def", 5678i )
map.add( "ghi", 9012l )
map.add( "jkl", 3456d )
Test map

makro = Macro
makro.add( :{1.add} )
makro.add( :{2.mul} )
makro.add( :{3.sub} )
makro.add( :{4.div} )
Test makro

#######################################################################################

Print '#' * 70

Test list.copy.add(set).add(table).add(tree)
Test set.copy.add(list).add(table).add(tree)
Test table.copy.add(list, set, tree).add(map, makro, bytes).add(kv,kv,kv)
Test tree.copy.add("list",list).add("set",set).add("table",table)
Test map.copy.add("kv", kv).add("list", list).add("set",set).add("table",table).add("tree",tree)

set_1.jmo

s = Set
s.add( 3 )
s.add( 9 )
s.add( 1 )
s.print

Try
	s.add( 3 )
.catch.info.print
s.print

s.take( 3 )
s.take( 2 )
s.print

s + 8
s.print

s.delete( 1 )
s - 3
s.print

s.remove( 1, 9 )
s.print

s.addAll( [11,14,16,17,19] )
s.print

s.subAll( [14,17] )
s.subtractAll( [16] )
s.removeAll( [19] )
s.print

s.add( 21, 22, 25, 28 )

s.contains( 2 ).print
s.contains( 11 ).print
s.contains( 11 ).print

s.each.toStr.begin("-> ").print

s.combine(" ").print
s.implode(',').print
s.implode("").print

s.print
s.fill("a {} b {} c {} d").print
s.fill("{} {} {} {} {} {} {} {} {}").print

s.min.print
s.max.print
s.sum.print
s.avg.print
s.average.print

s.clear
s.print
s.add( 0,8,6,4,2 )
s.print

s.reduce( 100, :a, a[1] + a[2] ).print
s.filter( :b, b > 5 ).print.type.print
s.amount( :c, c > 5 ).print

s.toList.print.type.print
s.copy.print.type.print

s.len.print
s.length.print

"------------------------------------------------".print

t = Set
t.fixType( "Char" )

t.add( 'a', 'c', 'e' )

Try
	t.add( 9 )
.catch.info.print

t.describe
t.print

set_setput.jmo

>lazyErrors

Set s = [3,5,7,9]s
s.set(4, 2)
s[3] = 1
s.put(0, 5)

Describe s

Try
	s[9]? = 11
.catch.info.print

shortcuts_compare.jmo

Group(2*3).print
"-".print
Group(2*Group(3+4).get).get.print
(2*(3+4)).print

"---".print

Group(1.toBool).get
	it.print
(1.toBool)
	it.print
	
"-".print

Group(0.toBool).get
	it.print
(0.toBool)
	it.print

"---".print

Group(1.toBool)
	it.print
(1.toBool)
	it.print

"-".print

Group(0.toBool)
	it.print
(0.toBool)
	it.print

"----------------------------------------".print

Count(3,7,2).print

"-".print

Count(3,7,2).each.print
{3,7,2}.print

"---".print

Count(3,7,2).each
	it.print
{3,7,2}
	it.print
	
"---".print

Count(3,7,2)
	it.print
{3,7,2}
	it.print

"----------------------------------------".print

While(true).print
"-".print

w = true
While(w).each.print.print(w=false)

w = true
While(w).each.print.print(w=false)

"---".print

w = true
While(w).each
	it.print
	w = false

w = true
While(w)
	it.print
	w = false
	
"---".print

w = true
While(w)
	it.print
	w = false

w = true
While(w)
	it.print
	w = false

"----------------------------------------".print

Use(true,2,7).print

"-".print

Use(true,2,7).get.print
true.use(2,7).print
Use(false,2,7).get.print
false.use(2,7).print

"---".print

Use(true,2,7).get
	it.print
true.use(2,7)
	it.print
Use(false,2,7).get
	it.print
false.use(2,7)
	it.print
	
"---".print

Use(true,2,7)
	it.print
true.use(2,7)
	it.print
Use(false,2,7)
	it.print
false.use(2,7)
	it.print

"----------------------------------------".print

Range(3,5).print
Range('a','d').print

"-".print

Range(3,5).each.print
(3..5).print
3..5.print
Range('a','d').each.print
('a'..'d').print
'a'..'d'.print

"---".print

Range(3,5).each
	it.print
3..5
	it.print
Range('a','d').each
	it.print
'a'..'d'
	it.print
	
"---".print

Range(3,5)
	it.print
3..5
	it.print
Range('a','d')
	it.print
'a'..'d'
	it.print

"========================================".print

List(3,7,2).print
[3,7,2].print
List(3,7,2).each.print
[3,7,2].each.print

"---".print

List(3,7,2).each
	it.print
[3,7,2].each
	it.print
	
"---".print

List(3,7,2)
	it.print
[3,7,2]
	it.print

shortcuts_struct.jmo

[1,2,3].ident.type.print
Print
[1,2,3]l.ident.type.print
Print
[1,2,3]s.ident.type.print
Print

shortcut_chars.jmo

L = [2,6,7,9,1,3,5]

"### EACH ###".print

L.amount( each < 5 ).print
L.amount( each < 5 ).print
L.amount( each < 5 ).print

"### CUR ###".print

L.print( cur.last )

L.print( cur.last )

"### IT ###".print

'a'.pass
	it.print

	it.print

"### THIS ###".print

::Foo
	this.print
	°print
Foo

"### FUNC ###".print

::func
	func.print
	#§print
	func.print

°func

"### LOOP ###".print

3.times
	loop.lap.print
	loop.lap.print # &lap.print
	loop.lap.print # ±lap.print

shortcut_list_set.jmo

List list = [ "foo", "bar", "baz" ]
Set  set  = [ "foo", "bar", "baz" ]s

list.describe
set.describe

shortcut_varlet.jmo

Count(1,3).each.mem(:a).print
Count(1,3).each.mem(:a).pass
	a.print
"---".print

{4,6}.print
{4,6}.mem(:a).print(a)
{4,6} => a
	a.print
"---".print

false.use('a', 'b').mem(:vlb).print
false.use('a', 'b') => vlb
	vlb.print
"---".print

w = true
While(w).each.mem(:vlc).pass
	vlc.print
	w = false
"---".print

sleep.jmo



"abc".print

this._sleep(10)
"def".print

sleep.jmo

::MySleep(Int i)
	this._sleep(i)

Print 1
a = Time

Sleep 1000

b = Time
x = b.toMilliSec - a.toMilliSec
(x >= 1000 && x < 1500).use("Okay","Dauer: "+x).print
Print 2
b = Time

MySleep 1000

c = Time
y = c.toMilliSec - b.toMilliSec
(y >= 1000 && y < 1500).use("Okay","Dauer: "+x).print
Print 3

sqlite_1.jmo

db = SQLite3

db.open

db.exec("CREATE TABLE test1 (nummer INTEGER PRIMARY KEY AUTOINCREMENT, namen VARCHAR(15));")
db.exec("INSERT INTO test1 (namen) VALUES ('Hallo');")
db.exec("INSERT INTO test1 (namen) VALUES ('Foo');")
db.query("SELECT * FROM test1").table.print
db.query("SELECT * FROM test1").list.print

Print '-' * 70

db.exec("CREATE TABLE test2 (nummer INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, namen VARCHAR(15));")
db.exec("INSERT INTO test2 (namen) VALUES ('Thomas')")
db.query("SELECT * FROM test2").table.print

Print '-' * 70

db.exec("CREATE TABLE test5 (id INTEGER NOT NULL PRIMARY KEY);")
db.exec("INSERT INTO test5 (id) VALUES (5)")
db.exec("INSERT INTO test5 (id) VALUES (9)")
db.query("SELECT * FROM test5").table.print

db.close

sqlite_2a.jmo

con = SQLite3
con.open

con.exec("CREATE TABLE stocks(date text, trans text, symbol text, qty real, price real)")

con.exec("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")
con.exec("INSERT INTO stocks VALUES ('2006-01-07','BUY','RHAT',500,34.94)")

con.query("SELECT * FROM stocks ORDER BY price").table.each.print

con.close

stream.jmo

1.print.print.print
2.echo.echo.print
57.print.print

stream_functioncall.jmo

::foo(x)
	x.print

°foo(123)
3.times.proc(cur.mem(:a).proc(°foo(a)))
3.times.mem(:b).proc(°foo(b))
°foo( 3.times... )

strict_1.jmo

>open

(1+9).print

Group(2+9).print
Group(2+9).get.print

Group(3.add(9)).print
Group(3.add(9)).get.print

strict_2.jmo


>high

Group(3.add(9)).print
Group(3.add(9)).get.print

Try.block
	Group(2+9).get.print
.catch.info.print

strict_ab_consts_obj_func.jmo

>low

::qsort1(List l) List
	Group( l.len.isLessOrEqual( 1 ) ).get.if
		func.print
		func.return(l)
	:p.let(l.first)
	:r.let(l.start(2))
	:a.let(this.qsort1( r.filter( each.isLessOrEqual( p ) ) ))
	:b.set(this.qsort1( r.filter( each.isGreater(p) ) ))
	func.return(a.add(p).concat(b))

::qsort2(List l)
	Group( l.len.isLessOrEqual( 1 ) ).get.if
		func.return(l).print
	:p.set(l.get(1))
	:r.set(l.start(2))
	Return(this.qsort2( r.filter( each.isLessOrEqual( p ) ) ).add(p).add( this.qsort2( r.filter( each.isGreater(p) ) ) ))

::qsort3(List l)
	Group(l.len.isLessOrEqual(1)).get.if
		func = l
	this.qsort3(l.start(2).filter(each.isLessOrEqual(l.get(1)))).replaceNil("-").add(l.get(1)).add(this.qsort3(l.start(2).filter(each.isGreater(l.get(1)))))

:tl.set(List(16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19))
this.qsort1(tl.print).print
this.qsort2(tl.print).print
this.qsort3(tl.print).print

Count(3).each.print

string.jmo

"nn"
"+" * 5
"dd".print
("aa"+"bb").print
"blablabla".print

("23"+"12").print
("23"*12).print
"23".split("2").describe

("-"*20).print

"w".toBool.print
"true".toBool.print
"True".toBool.print
"0".toBool.print
"1".toBool.print
"".toBool.print
"w".toStr.print

"Lorem ipsum dolor sit amet.".cut(3,3).print
"Lorem ipsum dolor sit amet.".part(3,5).print	#Früher cutTo, area
"Lorem ipsum dolor sit amet.".part(3,5).print
"Lorem ipsum dolor sit amet.".left(5).print
"Lorem ipsum dolor sit amet.".right(9).print

"Lorem ipsum dolor sit amet.".split(' ').describe
"Lorem ipsum dolor sit amet.".explode(' ').describe
"Lorem ipsum dolor sit amet.".split(' ').describe

"lorem".upper.print
"LOREM".lower.print

string_2.jmo

"abcabcabc".replace('b', '_').print
"abcabcabc".replace("bc", "yz").print
"abcabcabc".replace("bc", 'T').print

("Hallo"-'l').print

"BlaFoo".length.print

string_20190730.jmo

a = "a5654654"
b = "56546543"

### startsWith
a.startsWith(5).print
b.startsWith(5).print
a.startsWith('5').print
b.startsWith('5').print
a.startsWith("5").print
b.startsWith("5").print
a.startsWith("5654").print
b.startsWith("5654").print

(30*'-').print

### endsWith
a.endsWith(3).print
b.endsWith(3).print
a.endsWith('3').print
b.endsWith('3').print
a.endsWith("3").print
b.endsWith("3").print
a.endsWith("543").print
b.endsWith("543").print

(30*'-').print

### has
a.contains(3).print
b.contains(3).print
a.contains('3').print
b.contains('3').print
a.contains("3").print
b.contains("3").print
a.contains("543").print
b.contains("543").print

(30*'-').print

### trim
" 	  	blabla 	  	".trim.print
" 	  	blabla 	  	".trimLeft.print
" 	  	blabla 	  	".trimRight.print

(30*'-').print

### split
c = "blablafoobar"
c.group(1).print
c.group(2).print
c.group(3).print
c.group(4).print
c.group(9).print
c.group(90).print

c.split('l').print
c.split("ab").print
c.split("[ab]"l.toRegEx).print

c.splitKeep('l').print
c.splitKeep("ab").print

string_20190806.jmo

a = "abcdefg"
b = "defghij"

a.end(3).print
b.end(3).print
a.end(-3).print
b.end(-3).print
a.tillFirst('f').print
b.tillFirst('f').print
a.tillFirst("de").print
b.tillFirst("de").print

a.tillFirst("xy").print

('-'*30).print

a.start(3).print
b.start(3).print
a.start(-3).print
b.start(-3).print
a.fromFirst('f').print
b.fromFirst('f').print
a.fromFirst("de").print
b.fromFirst("de").print

a.fromFirst("xy").print

('-'*30).print

a.search('e').print
b.search('e').print
a.search("fg").print
b.search("fg").print

('-'*30).print

a.replace('c', "u").print
a.replace("de", "vw").print
a.replace(RegEx("[aceg]"l), '*').print

string_3.jmo

("f">"u").print
("f"<"u").print

("f">"ff").print
("f"<"ff").print
("f"=="u").print
("f"=="f").print
("f"!="u").print
("f"<>"u").print

string_5.jmo

("5"=="5").print
("5"=="6").print

string_6.jmo

a="Speak"; a[2].print

"Speak".change(2,'t').print
"Speak".change(1,"qu").print
"Speak".change(2,"qu").print
"Speak".change(5,"qu").print

("-"*30).print

"string".capital.print
"".capital.print
"s".capital.print
"String".capital.print
"sTRING".capital.print

("-"*30).print

('|'+("Hello".align(__LEFT, 10))+'|').print
('|'+("Hello".align(__RIGHT, 10))+'|').print
('|'+("Hello".align(__CENTER, 10))+'|').print
('|'+("Urlaub".align(__CENTER, 10))+'|').print

Try
	"Hello".align(__TOP, 10).print
.catch.detail.print

("-"*30).print

"1234567890".replace("4", "_").print
"1234567890".replace('4', "_").print
"1234567890".replace( 4, "_").print

"bla;foo".print;5.print

"Hello 0123 .,:-_+!?;()[\"]{}²³§$%&/=*~#'<>".print

string_7.jmo

s1 = "  \t|foo \t\t| "
s1.print

"1 ----------".print
s1.trim.print
s1.trim(' ','|').print
s1.trim(' ','|','\t','f').print

"2 ----------".print
s1.trimLeft.print
s1.trimLeft(' ','|').print
s1.trimLeft(' ','|','\t','f').print

"3 ----------".print
s1.trimRight.print
s1.trimRight(' ','|').print
s1.trimRight(' ','|','\t','f').print

"4 ----------".print
s1.start(4).print
s1.end(5).print

"5 ----------".print
s1.fromFirst('|').print
s1.afterFirst('|').print
"---".print
s1.tillFirst('|').print
s1.beforeFirst('|').print
"---".print
s1.fromFirst('|').tillFirst('|').print
s1.afterFirst('|').beforeFirst('|').print

string_cut.jmo

S = "abcbeba"
B = 'b'

T = Table(4)
T.add( "before", S.before(B), S.beforeFirst(B), S.beforeLast(B) )
T.add( "till",   S.till(B),   S.tillFirst(B),   S.tillLast(B) )
T.add( "from",   S.from(B), S.fromFirst(B), S.fromLast(B) )
T.add( "after",  S.after(B), S.afterFirst(B), S.afterLast(B) )

S.describe
B.describe
T.style("bD!").print

string_div.jmo

"blafio".charAt(4).describe

"bla	foo	bar\txyz".split('a').describe
"bla	foo	bar\txyz".split('\t').describe
"bla	foo	bar\txyz".split('\t').get(3).describe
"bla	foo	bar\txyz".split('	').get(3).describe

string_escape.jmo

S = "a123\\FOO\"'x - ä+\tn÷—l\"\0abc"

S.print.escape().print.unescape.print

string_escape_2.jmo

A = " 	 ab Cd	EF'\"g&hi×÷jkl\u001a\u001bm'n\top\\qrstuv\\twx<br>yz	 "
B = " 	 ab Cd	EF'\"ghijkl\u001a\u001bm'n\top\\qrstuv\\twx<br>yz	 \0"
C = " 	 ab Cd	EF'\"gh\nij\rkl\u001a\u001bm'n\top\\qr\fst\buv\\twx<br>yz	 \0"

::line
	Print '-'*60

::check(Str s1, Str s2)
	(s1 == s2)
		s1.print
	.else
		"!!! FAILED:".print
		s1.print
		"-----".print
		s2.print
	°line

::test(Str s)
	Print s
	°line
	
	°check( "{s:te}".fill(s), s.trim.escapeSlashes )
	°check( "{s:tE}".fill(s), s.trim.escape )
	°check( "{s:e}".fill(s), s.escapeSlashes )
	°check( "{s:E}".fill(s), s.escape )
	°check( "{s:r}".fill(s), s.unescape )
	
	°check( "{s:h}".fill(s), s.htmlSpecialChars )
	°check( "{s:H}".fill(s), s.htmlEntities )
	°check( "{s:d}".fill(s), s.htmlDecode )

	°check( "{s:c}".fill(s), s.capitalFirst )
	°check( "{s:C}".fill(s), s.capitalAll )
	°check( "{s:u}".fill(s), s.upper )
	°check( "{s:l}".fill(s), s.lower )

	4.times
		°check( ("{s:"+it+"}") .fill(s), s.quote(it,false) )
		°check( ("{s:"+it+"e}").fill(s), s.quote(it,false) )
		°check( ("{s:"+it+"E}").fill(s), s.quote(it,true) )

###############################################

°test(A)
Print '='*80
°test(B)
Print '='*80
°test(C)

string_format_1.jmo

::test(f)
	form = '|' + (7 * (f + '|'))
	("Format:\n"+form).print
	form.fill("4321", 1234, -1234, 12.34, -12.34, true, '7').print

°test("{5}")
°test("{5s}")
°test("{9>s}")
°test("{9<}")
°test("{3!s}")
°test("{3?s}")
°test("{7?^s}")
°test("{7?^i}")
°test("{3?d}")
°test("{11!s}")
°test("{2!>c}")
°test("{3!b}")
°test("{3!i}")

string_format_2.jmo

3.times.mem(:a).times.mem(:b).proc( "{}+{} = {}".fill(a,b,a+b) ).print

"|{}|{}|".fill(5, -5).print

string_format_3.jmo

::test1(f)
	form = '|' + (10 * (f + '|'))
	("Format:\n"+form).print

	form.fill("4321", 1234, -1234, 12.3, -12.34, 123.456, 123.9, true, '0', '9').print

°test1("{i:+}")
°test1("{d:+}")
°test1("{d:+1}")
°test1("{d:2}")
°test1("{d:+3}")
°test1("{d:4+}")
°test1("{d:+12}")
°test1("{d:+0}")
°test1("{d:0}")
°test1("{d:1}")

('-'*30).print

::test2(f)
	form = '|' + (10 * (f + '|'))
	("Format:\n"+form).print
	form.fill("4321", 1234, -1234, 12.34, -12.34, true, 'c', 'A', "abc", "ABC def\tghi").print

°test2("{c:u}")
°test2("{c:l}")

('-'*30).print

°test2("{s:u}")
°test2("{s:l}")
°test2("{s:c}")
°test2("{s:C}")
°test2("{s:E}")

('-'*30).print

°test2("{b:u}")
°test2("{b:l}")
°test2("{b:c}")
°test2("{b:C}")

string_format_4.jmo

A = " 	 ab Cd	EF'\"ghijkl\u001a\u001bm'n\top\\qrstuv\\twx<br>yz	 \0"
B = " 	 ab Cd	EF'\"gh\nij\rkl\u001a\u001bm'n\top\\qr\fst\buv\\twx<br>yz	 \0"

::test(Str form)
	Print "====> "+form+" <===="
	("|{"+form+"}|").fill(use).print

::part
	°test("")
	Print "---------------------------"
	°test(":")
	°test("s")
	°test("s:")
	Print "---------------------------"
	°test("s:t")
	°test("s:e")
	°test("s:E")
	°test("s:r")
	#°test("s:s")
	°test("s:h")
	°test("s:H")
	°test("s:d")
	°test("s:c")
	°test("s:C")
	°test("s:u")
	°test("s:l")
	°test("s:1")
	°test("s:2")
	°test("s:3")
	°test("s:4")
	Print "---------------------------"
	°test("s:tec")
	°test("s:rC")
	°test("s:Eu")
	°test("s:hl")
	°test("s:tHc")
	°test("s:tdC")
	Print "---------------------------"
	°test("s:tEh2")
	°test("s:tec1")
	°test("s:trC2")
	°test("s:tEu3")
	°test("s:thl4")
	°test("s:tHc1")
	°test("s:tdC2")
	Print "---------------------------"
	"|{s}|".fill(A).print
	"|{s:r}|".fill( "{s:e}".fill(A) ).print
	"|{s:r}|".fill( "{s:E}".fill(A) ).print
	"|{s:d}|".fill( "{s:h}".fill(A) ).print
	"|{s:d}|".fill( "{s:H}".fill(A) ).print

use = A
this.part
Print '#'*70
use = B
this.part

string_format_5.jmo

"|{5<}|{5^}|{5>}|{5L}|{5C}|{5R}|".fill(1,2,3,4,5,6).print

string_from_to.jmo

s = "abcdeffedcba"
s.print

"---".print

s.start(3).print
s.end(3).print

"---".print

s.fromFirst("c").print
s.afterFirst("c").print
s.tillFirst("c").print
s.beforeFirst("c").print

"---".print

s.fromLast("c").print
s.afterLast("c").print
s.tillLast("c").print
s.beforeLast("c").print

string_get_reverse.jmo

s = "abcde"

s.get(1).print
s.get(3).print
s.get(5).print

s[1].print
s[3].print
s[5].print

"---".print

s.get(-1).print
s.get(-3).print
s.get(-5).print

s[-1].print
s[-3].print
s[-5].print

"---".print

::test(Str s2, Int pos)
	Try
		s2.get(pos).print
	.catch.detail.print

°test(s, 1)
°test(s, 0)
°test(s, -1)
°test(s, 6)
°test(s, -6)

s.change(2,'y').print

"---".print

c = 'a'
c[1].print
c[-1].print

c.change(1,'c').print

string_limit.jmo

S = "abcdefghijkl"
S.limit( 0).add("...").print
S.limit( 1).add("...").print
S.limit( 3).add("...").print
S.limit(30).add("...").print

Print

S.limit( 0, "...").print
S.limit( 1, "...").print
S.limit( 3, "...").print
S.limit(30, "...").print

Print

"a".limit( 0, "...").print
"a".limit( 1, "...").print
"a".limit( 3, "...").print
"a".limit(30, "...").print

Print

"".limit( 0, "...").add("*").print
"".limit( 1, "...").add("*").print
"".limit( 3, "...").add("*").print
"".limit(30, "...").add("*").print

Print

S.limit(3).add( 'X' ).print
S.limit(3).add( 9 ).print
S.limit(3).add( "#" ).print
S.limit(3).add( 1.2 ).print
S.limit(3).add( true ).print

string_literal.jmo

s1 = "abc\tdef\nghi\\nop\\tuv wxyz"
s2 = "abc\tdef\nghi\\nop\\tuv wxyz"l

s1.print.type.print
"------------------------------".print
s2.print.type.print

"------------------------------".print
r = RegEx("^[a-z]+$")
r.match("foo").print
r.match("123").print
r.match("Abc").print
"-----".print

r = RegEx("^\\([a-z]\\)[0-9]+$")
r.match("(a)123").print
r.match("(b)234").print
r.match("c456").print
r.match("(d)").print

"-----".print
r = RegEx("^\([a-z]\)[0-9]+$"l)
r.match("(a)123").print
r.match("(b)234").print
r.match("c456").print
r.match("(d)").print

"-----".print

"(e)567".match("^\([a-z]\)[0-9]+$"r).print

string_quote_escape.jmo

S1 = "abc\ndef\\nghi\tjkl\\tmno"
S2 = "a%b!c\nd§e$f\\ng<h>i\tj#k~l\\tm°n?o&<<br>;"
FA = "{}"
FE1 = "{s:e}"
FE2 = "{s:E}"
FH1 = "{s:h}"
FH2 = "{s:H}"

::test(Str S)
	"=== Print ===".print
	S.print
	
	"\n=== Escape ===".print
	S.escape.print
	"---".print
	S.unescape.print
	"---".print
	S.print.escape.unescape.print

	"\n=== Quote ===".print
	"{:2}".fill(S).print
	"---".print
	S.print.quote.print.unquote.print	#Falsch
	"---".print
	S.unquote.print	#Falsch

	"\n=== Quote 1 ===".print
	"{:1}".fill(S).print
	"---".print
	S.print.quote(1).print.unquote(1).print	#Falsch
	"---".print
	S.unquote(1).print	#Falsch

	"\n=== Quote 3 ===".print
	"{:3}".fill(S).print
	"---".print
	S.print.quote(3).print.unquote(3).print	#Falsch
	"---".print
	S.unquote(3).print	#Falsch

	"\n=== Fill - Normal ===".print
	FA.fill(S).print
	"\n=== Fill - Escape ===".print
	FE1.fill(S).print
	"---".print
	FE2.fill(S).print
	"\n=== Fill - HTML ===".print
	FH1.fill(S).print
	"---".print
	FH2.fill(S).print

this.test(S1)
Print '#'*70
this.test(S2)

string_scan_1.jmo

""""
<html>
<body>
<table border=1>
<tbody><tr><td>1 </td><td bgcolor="FFFFFF"></td><td>White </td></tr><tr><td>49 </td><td bgcolor="E8E8E8"></td><td>Very Light Gray </td></tr><tr><td>99 </td><td bgcolor="e4e8e8"></td><td>Very Light Bluish Gray </td></tr><tr><td>86 </td><td bgcolor="afb5c7"></td><td>Light Bluish Gray </td></tr><tr><td>9 </td><td bgcolor="9c9c9c"></td><td>Light Gray </td></tr><tr><td>10 </td><td bgcolor="6b5a5a"></td><td>Dark Gray </td></tr><tr><td>85 </td><td bgcolor="595D60"></td><td>Dark Bluish Gray </td></tr><tr><td>11 </td><td bgcolor="212121"></td><td>Black </td></tr><tr><td>59 </td><td bgcolor="6a0e15"></td><td>Dark Red </td></tr><tr><td>5 </td><td bgcolor="b30006"></td><td>Red </td></tr><tr><td>27 </td><td bgcolor="B22222"></td><td>Rust </td></tr><tr><td>220 </td><td bgcolor="FF6347"></td><td>Coral </td></tr><tr><td>231 </td><td bgcolor="FF4500"></td><td>Dark Salmon </td></tr><tr><td>25 </td><td bgcolor="F08080"></td><td>Salmon </td></tr><tr><td>26 </td><td bgcolor="FFDAB9"></td><td>Light Salmon </td></tr><tr><td>58 </td><td bgcolor="8c6b6b"></td><td>Sand Red </td></tr><tr><td>88 </td><td bgcolor="89351d"></td><td>Reddish Brown </td></tr><tr><td>8 </td><td bgcolor="532115"></td><td>Brown </td></tr><tr><td>120 </td><td bgcolor="330000"></td><td>Dark Brown </td></tr><tr><td>69 </td><td bgcolor="907450"></td><td>Dark Tan </td></tr><tr><td>2 </td><td bgcolor="dec69c"></td><td>Tan </td></tr><tr><td>90 </td><td bgcolor="feccb0"></td><td>Light Nougat </td></tr><tr><td>28 </td><td bgcolor="FFAF7D"></td><td>Nougat </td></tr><tr><td>150 </td><td bgcolor="E3A05B"></td><td>Medium Nougat </td></tr><tr><td>225 </td><td bgcolor="E78B3E"></td><td>Dark Nougat </td></tr><tr><td>91 </td><td bgcolor="774125"></td><td>Medium Brown </td></tr><tr><td>106 </td><td bgcolor="B3694E"></td><td>Fabuland Brown </td></tr><tr><td>160 </td><td bgcolor="EF9121"></td><td>Fabuland Orange </td></tr><tr><td>29 </td><td bgcolor="E6881D"></td><td>Earth Orange </td></tr><tr><td>68 </td><td bgcolor="b35408"></td><td>Dark Orange </td></tr><tr><td>165 </td><td bgcolor="FA5947"></td><td>Neon Orange </td></tr><tr><td>4 </td><td bgcolor="FF7E14"></td><td>Orange </td></tr><tr><td>31 </td><td bgcolor="FFA531"></td><td>Medium Orange </td></tr><tr><td>110 </td><td bgcolor="F7BA30"></td><td>Bright Light Orange </td></tr><tr><td>32 </td><td bgcolor="f7ad63"></td><td>Light Orange </td></tr><tr><td>96 </td><td bgcolor="E6C05D"></td><td>Very Light Orange </td></tr><tr><td>161 </td><td bgcolor="DD982E"></td><td>Dark Yellow </td></tr><tr><td>3 </td><td bgcolor="f7d117"></td><td>Yellow </td></tr><tr><td>103 </td><td bgcolor="F3E055"></td><td>Bright Light Yellow </td></tr><tr><td>33 </td><td bgcolor="ffe383"></td><td>Light Yellow </td></tr><tr><td>35 </td><td bgcolor="EbEE8F"></td><td>Light Lime </td></tr><tr><td>158 </td><td bgcolor="DFEEA5"></td><td>Yellowish Green </td></tr><tr><td>166 </td><td bgcolor="BCEF66"></td><td>Neon Green </td></tr><tr><td>76 </td><td bgcolor="BDC618"></td><td>Medium Lime </td></tr><tr><td>34 </td><td bgcolor="A6CA55"></td><td>Lime </td></tr><tr><td>155 </td><td bgcolor="7C9051"></td><td>Olive Green </td></tr><tr><td>80 </td><td bgcolor="2E5543"></td><td>Dark Green </td></tr><tr><td>6 </td><td bgcolor="00642e"></td><td>Green </td></tr><tr><td>36 </td><td bgcolor="10cb31"></td><td>Bright Green </td></tr><tr><td>37 </td><td bgcolor="62F58E"></td><td>Medium Green </td></tr><tr><td>38 </td><td bgcolor="a5dbb5"></td><td>Light Green </td></tr><tr><td>48 </td><td bgcolor="76a290"></td><td>Sand Green </td></tr><tr><td>39 </td><td bgcolor="008a80"></td><td>Dark Turquoise </td></tr><tr><td>40 </td><td bgcolor="31B5CA"></td><td>Light Turquoise </td></tr><tr><td>41 </td><td bgcolor="b5d3d6"></td><td>Aqua </td></tr><tr><td>152 </td><td bgcolor="CCFFFF"></td><td>Light Aqua </td></tr><tr><td>63 </td><td bgcolor="143044"></td><td>Dark Blue </td></tr><tr><td>7 </td><td bgcolor="0057a6"></td><td>Blue </td></tr><tr><td>153 </td><td bgcolor="3399FF"></td><td>Dark Azure </td></tr><tr><td>156 </td><td bgcolor="42C0FB"></td><td>Medium Azure </td></tr><tr><td>42 </td><td bgcolor="61afff"></td><td>Medium Blue </td></tr><tr><td>72 </td><td bgcolor="6BADD6"></td><td>Maersk Blue </td></tr><tr><td>105 </td><td bgcolor="9FC3E9"></td><td>Bright Light Blue </td></tr><tr><td>62 </td><td bgcolor="B4D2E3"></td><td>Light Blue </td></tr><tr><td>87 </td><td bgcolor="7DBFDD"></td><td>Sky Blue </td></tr><tr><td>55 </td><td bgcolor="5a7184"></td><td>Sand Blue </td></tr><tr><td>97 </td><td bgcolor="506cef"></td><td>Blue-Violet </td></tr><tr><td>109 </td><td bgcolor="2032B0"></td><td>Dark Blue-Violet </td></tr><tr><td>43 </td><td bgcolor="3448a4"></td><td>Violet </td></tr><tr><td>73 </td><td bgcolor="9391e4"></td><td>Medium Violet </td></tr><tr><td>44 </td><td bgcolor="C9CAE2"></td><td>Light Violet </td></tr><tr><td>89 </td><td bgcolor="5f2683"></td><td>Dark Purple </td></tr><tr><td>24 </td><td bgcolor="a5499c"></td><td>Purple </td></tr><tr><td>93 </td><td bgcolor="DA70D6"></td><td>Light Purple </td></tr><tr><td>157 </td><td bgcolor="885E9E"></td><td>Medium Lavender </td></tr><tr><td>227 </td><td bgcolor="E0AAD9"></td><td>Clikits Lavender </td></tr><tr><td>154 </td><td bgcolor="B18CBF"></td><td>Lavender </td></tr><tr><td>54 </td><td bgcolor="B57DA5"></td><td>Sand Purple </td></tr><tr><td>71 </td><td bgcolor="B52952"></td><td>Magenta </td></tr><tr><td>47 </td><td bgcolor="C87080"></td><td>Dark Pink </td></tr><tr><td>94 </td><td bgcolor="F785B1"></td><td>Medium Dark Pink </td></tr><tr><td>104 </td><td bgcolor="FFBBFF"></td><td>Bright Pink </td></tr><tr><td>23 </td><td bgcolor="FFC0CB"></td><td>Pink </td></tr><tr><td>56 </td><td bgcolor="FFE1FF"></td><td>Light Pink </td></tr></tbody>
</table>
</body>
</html>
"""" => text

text.scan("<td bgcolor=\"", " </td>").each.replace("\"></td><td>", " - ").print

string_scan_2.jmo

""""
<html>
<body>
<table border=1>
"""" => text

text.scan("<body>", "</body>").each.print

string_split.jmo

text = "Dies ist eine,kleine nette, Zeile,oderso,zum Testen eben. Genau."

text.split(' ').describe.each.print
"-----".print
text.split(',').describe.each.print
"-----".print
text.splitKeep(' ').describe.each.print
"-----".print
text.splitKeep(',').describe.each.print
"-----".print
text.split(' ').each.splitKeep(',').each.splitKeep('.').each.print
"-----".print
text.split(' ').each.splitKeep([',','.']).each.print

string_trim.jmo

Print('|' + "".trim + '|')
Print('|' + "".trimLeft + '|')
Print('|' + "".trimRight + '|')
Print('|' + "" + '|')
Print("--------")
Print('|' + " 	 ".trim + '|')
Print('|' + " 	 ".trimLeft + '|')
Print('|' + " 	 ".trimRight + '|')
Print('|' + " 	 " + '|')
Print("--------")
Print('|' + " g	 ".trim + '|')
Print('|' + " g	 ".trimLeft + '|')
Print('|' + " g	 ".trimRight + '|')
Print('|' + " g	 " + '|')
Print("--------")
Print('|' + "h	 ".trim + '|')
Print('|' + "h	 ".trimLeft + '|')
Print('|' + "h	 ".trimRight + '|')
Print('|' + "h	 " + '|')
Print("--------")
Print('|' + "h	 i".trim + '|')
Print('|' + "h	 i".trimLeft + '|')
Print('|' + "h	 i".trimRight + '|')
Print('|' + "h	 i" + '|')
Print("--------")
Print('|' + "hji".trim + '|')
Print('|' + "hji".trimLeft + '|')
Print('|' + "hji".trimRight + '|')
Print('|' + "hji" + '|')

str_format_type.jmo

"|{t}|".fill( 3 ).print
"|{10t}|".fill( 'a' ).print
"|{10^t}|".fill( 7.0 ).print
"|{10>t}|".fill( 6f ).print
"|{3!t}|".fill( 8l ).print

str_from_to_start.jmo

s = "werjkhnmbdsfiuwezrjnhweroq".print
"-----".print
s.start(5).print
s.end(5).print

"-----".print
s.begin("!").print
s.append("!").print
s.add("!").print

"-----".print
s.from("n").print
s.fromFirst("n").print
s.fromLast("n").print
"-----".print
s.after("n").print
s.afterFirst("n").print
s.afterLast("n").print
"-----".print
s.till("n").print
s.tillFirst("n").print
s.tillLast("n").print
"-----".print
s.before("n").print
s.beforeFirst("n").print
s.beforeLast("n").print

str_functional.jmo

L = "a4e7g4sdf2ht1jjtr9rtz5k3m1"
L.print

(50*'=').print
##########################

L.filter(each.mem(:e) > 'a' || e=='4').print
L.filter( :e, e > 'a' || e=='4').print

::filter(Char x)
	§ = x > 'a' || x == '4'

L.filter( :{°filter} ).print

(50*'=').print
##########################

L.reduce(10, each.mem(:f)[1] + f[2].ord).print
L.reduce(10,  :f, f[1] + f[2].ord).print

::reduce(Int sum, Char add)
	§ = sum + add.ord

L.reduce(10,  :{°reduce} ).print	# Fehler

(50*'=').print
##########################

L.map(each.mem(:m) + 2 * m).print
L.map( :m, m + 2 * m).print
L.map( :m, m + 0).print
L.map( :m, m + '-').print
L.map( :m, m++).print
L.map( :m, m++3).print
L.map( :m, m--).print
L.map( :m, m--2).print

::map(Char x)
	§ = x -- 2

L.map( :{°map} ).print

(50*'=').print
##########################

L.print.sort.print

L.sort(each.mem(:s)[1] > s[2] || s[1]=='4').print
L.sort( :s, s[1] > s[2] || s[1]=='4').print

::sort(Char x, Char y)
	§ = x > y || x == '4'

L.sort( :{°sort} ).print

str_only_unite.jmo

S = "abc  ddeee//fg/hijj:  aabcccc d   ee/fgg///"

S.describe
S.only( 'a', 'b'..'e', "/:").describe
S.unite( ' ', 'e', '/' ).describe
S.unite( 'c' ).describe
S.unite( '/' ).describe
S.unite.describe

S.uniq.describe
S.unique.describe

str_quote.jmo

s = "foo\"bar'bak"
s.print
"-----".print
s.quote.print
s.quote.unquote.print
s.unquote.print
"-----".print
s.quote(1).print
s.quote(1).unquote(1).print
"-----".print
"".quote(2).print
"".unquote.print
"\"\"".unquote.print
"\"\"".unquote.print
"'\"'\"'abc'''def\"\"\\\'ghi'\"\\\"'".print.unquote(1).print

str_quote2.jmo

s = "123\\foo\"'x - ä+\tn÷—l\""
s.print;

"-----".print

s.quote(1).print
"{s:1}".fill(s).print
s.quote(2).print
"{s:2}".fill(s).print
s.quote(3).print
"{s:3}".fill(s).print
s.quote(4).print
"{s:4}".fill(s).print

"-----".print

s.quote(1).print.unquote(1).print
s.quote(2).print.unquote(2).print
s.quote(3).print.unquote(3).print
s.quote(4).print.unquote(4).print

str_quote4.jmo

S = "a123\\FOO\"'x - ä+\tn÷—l\"\0abc"
S.print;

Print "-----"

S.quote(1).print

Print "-----"

"{s}".fill(S).print
"{s:E}".fill(S).print
"{s:1}".fill(S).print

str_to_file.jmo

TARGET = "/tmp/test.txt".print
FILE = File( TARGET )

1234.toStr.fileSet( TARGET ).ident
FILE.read.ident

5678.toStr.fileSet( TARGET, Charset.ASCII ).ident
FILE.read.ident

9012.toStr.fileAdd( TARGET ).ident
FILE.read.ident

3456.toStr.fileAdd( TARGET, Charset.ASCII ).ident
FILE.read.ident

FILE.delete.print

str_width.jmo

s = "abcdefghi"
s.width(  0 ).replace(' ', '.').print
s.width(  1 ).replace(' ', '.').print
s.width(  3 ).replace(' ', '.').print
s.width(  7 ).replace(' ', '.').print
s.width(  9 ).replace(' ', '.').print
s.width( 12 ).replace(' ', '.').print
s.width( 20 ).replace(' ', '.').print

Try
	s.width( -1 ).print
.catch.info.print

('-' * 40).print

s.align(__LEFT, 14).replace(' ', '.').print
s.align(__RIGHT, 14).replace(' ', '.').print
s.align(__CENTER, 14).replace(' ', '.').print

super_1.jmo

::Parent
	::say
		Print "I'm the parent"
	::test
		Print "Test"

::Child ^ Parent
	this.test
	Print "-"
	super.test
	Print "-"
	this.say
	Print "-"
	super.say
	Print "-"

	::say
		Print "I'm the child"
		super.say

c = Child
Print "---"
c.say
c.test

#####################################################
Print '-'*40

::MySuperClass
	::superMethod1
		Print "superMethod 1"
	::superMethod2
		Print "superMethod 2"
	::superMethod3
		Print "superMethod 3"
	::superMethod4( foo )
		Print "superMethod 4: "+foo

::MyClass ^ MySuperClass
	::myMethod1
		Print "myMethod 1"
		super.superMethod1
		super.superMethod4 "abc"
	::superMethod2
		Print "myMethod 2"
	::superMethod3
		super.superMethod3
	::superMethod4
		Print "myMethod 4"

a = MyClass
a.myMethod1
Print "-"
a.superMethod1
Print "-"
a.superMethod2
Print "-"
a.superMethod3
Print "-"
a.superMethod4

super_2.jmo

::Bar
	::test
		Print "Test"

::Foo ^ Bar
	super.test
	this.test

Foo

super_events_1.jmo

>lazyErrors

::Parent
	Print "--- Parent ---"

	::@one
	::@two

	::one
		this.@one
	::two
		this.@two
	
	this::@one
		Print "Event: parent one"
	this::@two
		Print "Event: parent two"

	this.@one
	Print "---"
	this.@two

##########################################

::Child ^ Parent
	Print "--- Child ---"

	::@three

	::three
		this.@three
	
	this::@one
		Print "Event: child one"
	super::@one
		Print "Event: child->parent one"
	this::@three
		Print "Event: child three"

	this.@three
	Print "---"

	Try
		this.@one
	.catch.info.print
	Try
		this.@two
	.catch.info.print
	Try
		super.@one
	.catch.info.print
	Try
		super.@two
	.catch.info.print

##########################################

c = Child

c::@one
	Print "Def one"
c::@two
	Print "Def two"
c::@three
	Print "Def three"

Print "--- Functions Child ---------------------"
c.one
Print "-"
c.two
Print "-"
c.three

p = Parent

p::@one
	Print "Def one"
p::@two
	Print "Def two"

Print "--- Functions Parent ---------------------"
p.one
Print "-"
p.two

super_events_2.jmo

>lazyErrors

::Old
	::@old

	::runOld
		this.@old

	this::@old
		Print "Old"

::Parent ^ Old
	::@parent

	::runParent
		this.@parent

	this::@parent
		Print "Parent"

::Child ^ Parent
	::@child

	this::@child
		Print "Child"

	::runChild
		this.@child

##########################################

c = Child

c::@old
	Print "Def old"
c::@parent
	Print "Def parent"
c::@child
	Print "Def child"

Print "-------------------"
c.runChild
Print "---"
c.runParent
Print "---"
c.runOld

swing.jmo

>prefix "Swing"

f=_Main

b1=_Button
b1.setText("Fooo")
b1::@select
	Print "Fooo"

b2=_Button
b2.setText("Exit")

b2::@select
	Exit

f.add(b1)
f.add(b2)

f.size(400,300).run

swing_button.jmo

b=Swing_Button("This is a Button")
f=Swing_Main
f.add(b)
f.size(400,300).run

swing_font.jmo

f = Swing_Font("Arial",16)
f.toStr.print
f.toIdent.print
f.toDescribe.print

Print "-----------------"

f = Swing_Font("Helvetica",12).bold.italic
f.toStr.print
f.toIdent.print
f.toDescribe.print

swing_list.jmo

>prefix("Swing")

m = _Main(800,600,"Swing-List")

###############

m.add( c1=_List )

l = [3,6,'r',"foo",5.678]
c1.data = l

c1.selection.print

c1::@select
	%.print
	%.selection.print
	

###############

m.run

swing_table.jmo

>prefix("Swing")

m = _Main(800,600,"Swing-Table")
t = _Table
m.add( t )

data = Table(4)
data.add("abc",3,1.1,'a')
data.add("bcd",4,1.2,'b')
data.add("cde",5,1.3,'c')
data.add("def",6,1.4,'d')
data.add("efg",7,1.5,'e')
data.add("fgh",8,1.6,'f')
data.add("ghi",9,1.7,'g')
data.add("hij",10,1.8,'h')
data.setTitles( "String","Int","Dec","Char" )
t.data = data

m.run

sys_1.jmo

s = Sys

[
s.arch,
s.architecture,
s.osName,
s.fontEncoding,
s.land,
s.language,
s.user,
s.username,
s.javaVersion,
s.separatorPath,
s.separatorDir,
s.separatorFile,
s.separatorLine,
s.processUptime > 1,
s.rootDir.toStr,
s.tempDir.toStr,
s.homeDir.toStr,
s.currentDir.toStr,
s.hostName,
].each.print

sys_env.jmo

Sys.env("USER").describe
Print

Sys.envMap.get("LANG").describe

table.jmo

a=Table(2)
a.add(4,3)
a.add(2,5)
a[1][2].print

c=Table(2)
c.add(4,3)
c.add(2,5)
d=2
c.get(d)[2].print

e=Table(2)
e.add(4,3)
e.add(3,5)
e.each.print

tableblock_1.jmo

t = ||||
"foo",'a',6
"abc",'b',7
"def",'c',8
||||

t.describe

"----------".print

tab = ||||
2,3,4
6,8,9
1,2,3
5,9,8
||||.print

tab.print

"----------".print

x = 4

||||
2.print,3+5,4*2,9
6*x,x,x-2,3
1+x,x/2,3.print,'x'
5,(9*x).print,8,123
||||=>tab

tab.print

tableblock_2.jmo

row = >>>>
	item
		no: 123
		name: "foo"
		type: "PART"
	color_id = 81
	new_or_used: "U"
	quantity = 11
	sale_rate = 75
	unit_price = 1.23
	<<<<
row.print

"-----------------------------------------------".print

CURDATE = Date(2020,12,11)

data = Table(3)
.add( "no", 			"{s3}",	row$item$no )
.add( "name", 			"{s3}", row$item$name )
.add( "type", 			"{s3}", row$item$type )
.add( "color", 			"{}", 	row$color_id )
.add( "used", 			"{}", 	(row$new_or_used == "U").toStr.upper )
.add( "cur_date", 		"{s3}", CURDATE )
.add( "cur_qty", 		"{}", 	row$quantity )
.add( "cur_sale", 		"{}", 	row$sale_rate )
.add( "cur_price", 		"{}", 	row$unit_price )
.add( "comment", 		"{}", 	(row.pull("description").replaceNil("").len > 0).toStr.upper )

data.describe

"-----------------------------------------------".print
data2 = ||||
"no", 			"{s3}",	row$item$no
"name", 		"{s3}", row$item$name
"type", 		"{s3}", row$item$type
"color", 		"{}", 	row$color_id
"used", 		"{}", 	(row$new_or_used == "U").toStr.upper
"cur_date", 	"{s3}", CURDATE
"cur_qty", 		"{}", 	row$quantity
"cur_sale", 	"{}", 	row$sale_rate
"cur_price", 	"{}", 	row$unit_price
"comment", 		"{}", 	(row.pull("description").replaceNil("").len > 0).toStr.upper
||||

data2.describe

tableblock_3.jmo

t = ||||
"foo",'a',6
"abc",'b',7
"def",'c',8
||||

t.describe

"----------".print

tab = ||||
2,23,44
56, 8,69
71,12, 3
5, 9, 8
15,29,38
||||.print

tab.print

"----------".print

x = 4

||||
2.print, 3+5, 4*2, 9
6*x, x  , x-2    , 3
1+x, x/2, 3.print, 'x'
5  ,(9*x).print,8,123
|||| => tab

"---".print
tab.print

tableblock_comment_1.jmo

||||
(3+1).print,(3+2)*4
||||=>tab
tab.print

Print 40 * '-'

||||
1,2,3

7,8,9
5,6,7
8,9,0
||||.each.print

Print 40 * '-'

1.pass
	1.pass
		||||
		1,2
		3,4		
		#5,6
		7,8
		|||| => t
		t.print

Print 40 * '-'

x = 7

||||
2.print,3+5,4*2,9
6*x,x,x-2,3
1+x,x/2,3.print,'x'
5,(9*x).print,8,123
||||=>tab
tab.print

Print 40 * '-'

||||
2.print,3+5,4*2,9
5,(9*x).print,"hallo".cut(2,3),123
||||=>tab
tab.print

tableblock_end.jmo

1.pass
	1.pass
		||||
		1,2
		3,4
		7,8
		"||||",'|'
		|||| => t
		t.print

tableblock_level_1y.jmo

1.pass
	1.pass
		||||

		1,2
		3,4

		7,8

		|||| => t
		
		t.print

tableblock_level_1z.jmo

1.pass
	1.pass
		||||
		1,2
		3,4
		7,8
		|||| => t
		
		t.print

tablestyle_align.jmo

t=Table(4)
.add(1,2,3,4)
.add(3,4,5,6)
.add("abc","def","ghi","jkl")
.add(12.34,23.45,34.56,45.67)
.print

Print "-------------------------------"

t.style("".ident).print
Print
sl = t.style("L".ident).print
Print
sc = t.style("C".ident).print
Print
sr = t.style("R".ident).print
Print
s1 = t.style("L:LCRL".ident).print
Print
s2 = t.style(":_CR_".ident).print
Print
s3 = t.style("R:_CRL".ident).print

Print "-------------------------------"

tl = t.style("<".ident)
tc = t.style("^".ident)
tr = t.style(">".ident)
t1 = t.style("<:<^><".ident)
t2 = t.style(":_^>_".ident)
t3 = t.style(">:_^><".ident)

Print sl == tl
Print sc == tc
Print sr == tr
Print s1 == t1
Print s2 == t2
Print s3 == t3

tablestyle_conversion.jmo

tab = Table(3)
tab.add(1b.toStr, 1b.toIdent, 1b.toDescribe)
tab.add(1b, 1b, 1b)
tab.add(1i.toStr, 1i.toIdent, 1i.toDescribe)
tab.add(1i, 1i, 1i)

tab.style(">!").print
Print
tab.style(">I!").print
Print
tab.style(">D!").print

tablestyle_lines.jmo

t=Table(4)
.add(1,2,3,4)
.add(3,4,5,6)
.add("abc","def","ghi","jkl")
.add(12.34,23.45,34.56,45.67)
.print

Print "-------------------"

t.style("".print).print
Print
t.style("b".print).print
Print
t.style("b|".print).print
Print
t.style("bu|".print).print
Print
t.style("b!".print).print
Print
t.style("b-".print).print
Print
t.style("bu-".print).print
Print
t.style("u-".print).print
Print
t.style("b1".print).print
Print
t.style("b2".print).print
Print
t.style("bn".print).print
Print
t.style("b:!|1".print).print
Print
t.style("b:!|2:-*n".print).print
Print
t.style("b|-:!_._1:**n".print).print
Print
t.style("bC1:!R_L:*n-".print).print

tablestyle_rowlines.jmo



t=Table(4)
.add(1,2,3,4)
.add(3,4,5,6)
.add("abc","def","ghi","jkl")
.add(12.34,23.45,34.56,45.67)

t.style("bn".print).print
t.style("b-".print).print
t.style("b=".print).print
t.style("b::n-=".print).print
t.style("b:: n-".print).print
t.style("bn:: =-".print).print
t.style("b=:: *n".print).print
t.style("bn::* ".print).print

tablestyle_whitespace.jmo



t=Table(4)
.add(1,2,3,4)
.add(3,4,5,6)
.add("abc","def","ghi","jkl")
.add(12.34,23.45,34.56,45.67)
.print

Print "-------------------"

t.style("-|:| .:- *".print).print   # +*.=
t.style("-|: ..:=* ".print).print   # +*.=

table_2.jmo

t=Table(3)
t.add(3,15,9)
t.add(4,7,123)
t.print

t.get(1, 2).print

t.add(1,"Z",'a')
t.describe
t.print

table_contains.jmo

||||
"Black",11i
"Blue",7i
"Brown",8i
"Green",6i
|||| => tab

tab.contains( "8" ).print
tab.contains( "Blue" ).print
tab.contains( "green" ).print
tab.contains( 8 ).print
tab.contains( 8b ).print
tab.contains( 3 ).print

"-----".print

tab.column(2).contains( "8" ).print
tab.column(2).contains( 8 ).print
tab.column(2).contains( 8s ).print
tab.column(2).contains( 8b ).print
tab.column(2).contains( '8' ).print

table_delete.jmo

>lazyErrors

Print 123
Print 5+6
Print 2*4*7

"-----".print

Print (2+5).print
"--".print
Print(2+5).print

"---------------".print

t1 = ||||
1,2,3
4,5,6
7,8,9
||||

Try
	t1.deleteRows(1,3,1).print
.catch.info.print

"-----".print

t1.print
"-----".print
t1.deleteRows(1,3).print

"-----".print
t1.deleteRow(1).print

"-----".print
t1.print

"-----".print

Try
	t1.deleteRows.print
.catch.info.print

t1.print

table_functional.jmo

tab = Table(3)
.add( "menu", "Menü", "Menue" )
.add( "intro", "Einleitung", "Intro" )
.add( "install", "Installation", "Install" )
.add( "tutorial", "Einführung", "Tutorial" )
.add( "commands", "Befehlsübersicht", "Commands" )
.add( "install", "Install-Anleitung", "Anleitung" )
.add( "license", "Lizenz", "Lizense" )

#####################################################

tab.filter( each[1] == "install" ).describe
Print
tab.filter( each[2].startsWith('E') ).describe
Print
tab.filter( each[3].contains('a') ).describe

Print "-----"

tab.amount( each[1] == "install" ).describe
tab.amount( each[2].startsWith('E') ).describe
tab.amount( each[3].contains('a') ).describe

Print "-----"

tab.reduce( 0, :a, a[1] + a[2,1].length ).describe
tab.reduce( 1000, :a, a[1] + a[2,1].length + a[2,2].length + a[2,3].length ).describe

Print "-----"

tab.map( :a, a[1] = a[1].upper ).describe
Print
tab.map( :b, [ b[1].capital, b[2].lower, b[3].left(3)] ).describe

table_get.jmo

t = Table(3, 1, 0)

t.set(9, 1, 2)
t.add(1, 2, 3)
t.add(4, 5, 6)
t.print

t.get(3, 1).print
t.get(1).print
t[2][1].print
t.get(1,2).print
t[1,2].print

table_init.jmo

t = Table( 8, 4, 'a' )
t.describe

tab = Table( 8 )
tab.init( 6, nil )
tab.setTitles( "Byte","Short","Int","Long","BigInt","Float","Dec","BigDec" )
tab.describe

x = Table(3)
x.init( 2, 'a' )
x.init( 2, 'b' )
x.init( 2, 'c' )
x.init( 2, 'd' )
x.describe

table_search.jmo

tab = Table(3)
.add( "menu", "Menü", "Menue" )
.add( "intro", "Einleitung", "Intro" )
.add( "install", "Installation", "Install" )
.add( "tutorial", "Einführung", "Tutorial" )
.add( "commands", "Befehlsübersicht", "Commands" )
.add( "install", "Install-Anleitung", "Anleitung" )
.add( "license", "Lizenz", "Lizense" )

SEARCH = "install"
REGEX = ".*l"r
TABSTYLE="|"

tab.search(SEARCH).style(TABSTYLE).print
Print
tab.search(REGEX).style(TABSTYLE).print
Print
tab.search(SEARCH, 1).style(TABSTYLE).print
Print
tab.search(REGEX, 1, 3).use(cur==nil, "<empty>", cur.style(TABSTYLE)).print
Print
tab.search(SEARCH,3).use(cur==nil, "<empty>", cur.style(TABSTYLE)).print

Print "-----"

tab.searchFirst(SEARCH).describe
tab.searchFirst(REGEX).describe
tab.searchFirst(SEARCH, 1).describe
tab.searchFirst(REGEX, 1, 3).describe
tab.searchFirst(SEARCH,3).describe

Print "-----"

tab.searchLast(SEARCH).describe
tab.searchLast(REGEX).describe
tab.searchLast(SEARCH, 1).describe
tab.searchLast(REGEX, 1, 3).describe
tab.searchLast(SEARCH,3).describe

table_sort_2.jmo



m = Map
m.add("C",-3)
m.add("L",-2)
m.add("N",-1)
m.add("A", 0)
m.add("M", 1)
m.add("G", 2)
m.add("F", 3)
m.add("D", 4)

X = "-------------------------"

m
.describe.print(X)
.toTable
.describe.print(X)
.sort(-2)
.describe.print(X)
.sort
.describe

table_sort_3.jmo

t = Table(7)

t.add( false, 5b,  15s,  0i, 1l,  '5', "10" )
t.add( true , 1b,  20s,  1i, 5l,  'A', "15" )
t.add( true , 10b, 0s,   5i, 10l, '+', "aa" )
t.add( false, 0b,  10s, 10i, 15l, 'b', "0"  )
t.add( true , 20b, 1s,  15i, 20l, 'a', "1"  )
t.add( true , 15b, 5s,  20i, 0l,  '1', "5"  )
t.add( false, 1b,  1s,   1i, 1l,  'B', "1"  )
t.add( false, 3b,  3s,   3i, 3l,  'ä', "ä"  )

t.describe

"----------------- sort".print
t.sort
t.describe
"----------------- reverse".print
t.reverse
t.describe
"----------------- 1".print
t.sort(1)
t.describe
"----------------- 1,2".print
t.sort(1,2)
t.describe
"----------------- 2".print
t.sort(2)
t.describe
"----------------- 3".print
t.sort(3)
t.describe
"----------------- 4".print
t.sort(4)
t.describe
"----------------- 5".print
t.sort(5)
t.describe
"----------------- 6".print
t.sort(6)
t.describe
"----------------- 7".print
t.sort(7)
t.describe

table_titles.jmo

t = Table(3)
t.add(6,7,8).add(11,12,13).add(-2,-3,-4)

t.eachMap.print

t.setTitles("foo","bak","bar")

t.each.print
t.eachMap.print
t.eachMap
	it$bak.print

table_titles2.jmo

t = Table(3)
t.add(6,7,8).add(11,12,13).add(-2,-3,-4)

t.setTitles("foo","bak","bar")

t.rowMap(2)$bar.print
t.rowMap(2).print
t.rowMap(1).print

table_titles3.jmo

t = Table(2)
titles = ["Foo","Bar"]
t.setTitles( :titles )
t.getTitles.print

t.add('a', 'b')
t.add('c', 'd')
t.add('e', 'f')

t.print
t.toIdent.print

table_titles4.jmo

t = Table( 3 )
t.setTitles( "abc","def","ghi" )
t.add(4, 5, 6)
t.add(7, 8, 9)
t.print
Print "---"
t.describe

Print "############################"

tab = Table(2)
tab.add( 1,2 )
tab.add( 3,4 )
tab.setTitles( "Foo", "Bar" )
tab.print
Print "---"
tab.describe

Print "############################"

tcp_server_small.jmo

"Please run:".print
"nc localhost 33333".print
"------------------".print

tcp=TcpServer(33333)

tcp::@connect
	%send("Hello!")
	%close

tcp.wait(60)

tee.jmo

"bla".pass
	(it * 3).sub('l').print
.print

a= "abc".pass
	it.add("def").print
a.print

b = "uvw".pass
	it.add("xyz").print
.print
b.print

tee_varlet.jmo

t11 = [1,2,3]
t12 = [4,5,6]

t12.each.tee( cur.mem(:a).tee( t11.add(a))).print
t11.print
t12.print

"---".print

t21 = [1,2,3]
t22 = [4,5,6]

t22.each.tee( :a, t21.add(a) ).print
t21.print
t22.print

"---".print

t31 = [1,2,3]
t32 = [4,5,6]

t31.add( t32.each... ).print
t31.print
t32.print

"---".print

t41 = [1,2,3]
t42 = [4,5,6]

t41.addAll(t42 ).print
t41.print
t42.print

test_2019-09-07.jmo

°print
°type.print	

a=Table(2);a.add(1,2).add(3,4).add(5,6).print.get(2,2).toStr.mul(5).print
Table(2).add(1,2).add(3,4).add(5,6).print.get(2,2).toStr.mul(5).print

[1..10].unfold.each.print
[1..10].unfold.reverse.each.print
[1,2,3,4,5].reverse.each.print
[1..10].unfold.reverse.print
[1..10000].unfold.reverse.get(5).print

test_2020-04-23_div.jmo

(5 <> 3).print
(5 != 3).print
(5 == 3).print

"---".print

::test(a,b,c,d)
	"{5<} || {5<} ^^ {5<} && {5<}".fill(a,b,c,d).echo
	(a || b ^^ c && d).toStr.begin("   = ").print

{0,1} => aa
	{0,1} => bb
		{0,1} => cc
			{0,1} => dd
				°test(aa.toBool, bb.toBool, cc.toBool, dd.toBool)

"---".print

aa = 3
aa.print(cur.times...)
'a'.print(3.times...)

test_2020-04-26_div.jmo

Try
	a = 1
	a += 3.times
		it = it+1
	a.print
.catch.detail.print

"".till(-2).begin('>').add('<').print

2**.print

[1,5,8,3,5,2,3,9].print.add(2).print.delete(2).print.remove(3).print.only(2,8).print

("Hallo"-"all").print
("24242"-"2").print
("24242"-'2').print
("24242"-2).print

a=5;(a>2).if;	5.print;	it.print;'e'.print

test_2020-04-26_try_funcdef.jmo

::testX(Int i)Int
	it.print
	§ = i + i * i
	
°testX(3).print

"---".print

Try
	::testA(Int i)Int;	itx*i+i; 5.testA(3).print
.catch.message.print

"---".print

Try
	::testD(Int i)Int;	itx*i+i; °testD(3).print
.catch.message.print

"---".print
::testB(Int i)Int;	§= i*i+i; this.testB(3).print
"---".print
::testC(Int i)Int;	§= i*i+i; °testC(3).print

test_2020-04-27_div.jmo

(23<12==false).print

"-----".print

("Hal\\/^lo" - '\').print   
("Hal\\/^lo" - '(').print
"Hal\/^lo"l.print   

"-----".print

Cmd("ls /home/mike/git/jaymo/JayMo/test/local/testdir/").buffer.output.print.lines.each.sub(".txt").right(2).begin("https://youtu.be/").print

test_2020-06-15.jmo

a? = nil
a?.ifNil
	11.print
.else
	12.print
a?.ifNotNil
	21.print
.else
	22.print

a? = 'a'
a?.ifNil
	31.print
.else
	32.print
a?.ifNotNil
	41.print
.else
	42.print

"-----".print

this.print

::MyType
	#func.print	#MyType.main
	this.print

MyType.toStr.print	#Instance(MyType)

"-----".print

10.each.print

"-----".print

[4,9,5,2,6].reduce(5, each.mem(:b)[1] + b[2]).print
[4,9,5,2,6].reduce(5, :c, c[1] + c[2]).print

"-----".print

"foobar".startsWith("foo").print
"foobar".endsWith("bar").print
"foobar".contains("foo").print
"foobar".contains("bar").print

"-----".print

"do re  mi ".split(' ').describe
"abcd".split.describe
"abcd".split("").describe

"-----".print

"lorem ipsum".search("ipsum").print
"lorem ipsum".search("dorem").print
"do re re".searchFirst("re").print
"do re re".searchLast("re").print

"-----".print

65.chr.print
'A'.ord.print

"-----".print

(4 & 1).print
4.bitAnd(1).print

(4 | 1).print
4.bitOr(1).print

(4 % 3).print
4.mod(3).print

(4 ^ 1).print
4.bitXor(1).print

"-----".print

"abcdef".split.each.append("re").print

"-----".print

::round( Dec d )
	d.roundUp.print
	d.ceil.print
	d.roof.print
	d.roundDown.print
	d.floor.print

	d.round.print

°round( 5.123 )
"-".print
°round( 7.891 )

"-----".print

Try
	"abcdef".replace(this, 'a').print
.catch.detail.print
Try
	Date(2020,7,14).add('a').print
.catch.detail.print

"-----".print

test_2020-07-17.jmo

::test1(a)
	a.is( 5 )
		"A".print
	.else
		"B".print
		
°test1(5)
"-".print
°test1(9)

"-----".print

::Test = foo
	::foo
		"Foo".print

Test.foo
Test.foo   #.do
Test.print

"-----".print

Object c? = 'a'
c.print
c? = 9
c.print
Try
	c? = 2.3
	c.print
.catch.detail.print

test_2020-09-27_varlets.jmo

>lazyErrors

b = :a
c = :b

c.print
c.get.print
Try
	c.get.get.print
.catch.info.print
a = 5
c.get.get.print
b.get.print
c.get.set(3)
a.print

## Varlet auf undefinierte Variable wirklich erlauben? Ja, muss fast

"-----".print
"foo".count('o').print
"foo".amount(each == 'o').print

::_foo = 4 + 5; this._foo.print

"-----".print
Count(5).each.mem(:z).print(2+z+3)

"-----".print
(1..9).compute.print
[4,9,5,2,6].reduce(5, :l, l[1] + l[2]).print
[4,9,5,2,6].reduce(5, each.mem(:k)[1] + k[2]).print

test_2020-10-23.jmo

>lazyErrors

f = :{5.print}

f.exec
f.exec
f.exec('x')

"----------".print

i = :{"abcdefghijklmn".left}
i.exec(3).print
i.exec(9).print
i.exec(1).print

"----------".print

g = :{Map.add}

g.exec(2,'a').print
g.exec(4,'b').print

"----------".print

h = :{Map.add}
h.exec(1,'c').print
h.exec(3,'d').print
h.print

"----------".print

m=5
m=++.print

"----------".print

a = 3

::foo = a

::bar
	§ = °foo

c = :{°bar}
c.try
	it.exec.print
.catch.info.print

"----------".print

d = :{°foo}
d.try
	it.exec.print
.catch.info.print

"----------".print

::xyz(aa,bb) = aa*bb
::uvw(aa,bb,cc) = °xyz(aa+bb,cc)
e = :{°uvw}
e.exec(1,2,3).print

"----------".print

::test( aa )!!
	func.init( 1, 9 ).print
	aa.print

this.test( 5 ).print
"-----".print
this.test( cur.toStr ).print
"-----".print
this.test( each.toStr ).print

"----------".print

::test2( aa )!!
	func.init( 1, 2 ).print
	aa.print

this.test2( each.mem(:b).proc(5+b) ).print

"----------".print

x = 0
5.times
	x=++
x.print

"----------".print

x = 0
Count( 4 ).each
	x=++
x.print

"----------".print

s = "abc def geh\nrst uvw xyz"
s.field(' ',1).print
s.field(' ',4).print
"---".print
s.fields(' ',1).print
s.fields(' ',1,3).print
s.fields(' ',1,4,4).print

ll = [1,2,4,5,4,2,1]
s.fields(' ',:ll).print
"---".print
s.fields(' ').print
"---".print
s.table(' ').print

test_2020-12-04.jmo

("abc"[2] = 'c').print
"abc".set('x', 2).print

("abc"[9]? = 'z').print
"----------".print

"\n\n".print.type.print
"\n\n"l.print.type.print
"\n\n"r.print.type.print

"----------".print
For(1,each<5,each++).each.print
"----------".print

(5***9).print
(5** *9).print
(5**9).print
(5**).print
"----------".print
(5++).print
(5++4).print
(5+++4).print
(5++ +4).print
(5+++++++++++4).print

"----------".print
(5<<).print
(5<<2).print
(1<<2).print
(1<<).print
(5>>2).print

"----------".print

[1,5,2,9].begin(0).print
[1,5,2,9].append(123).print

"----------".print
f = :{"abc".len}
f.exec.print
f.print.type.print

test_2021-04-19.jmo

>prefix("Xyz")

al = Java("ArrayList")
al.toString.print

"----------".print

c = Count(3)
c.print

:c::@varChanged
	"geändert".print

c = Count(5)

"----------".print

( "abc"+'d'+567+3.56 ).print

"----------".print

::test
	('a'+'b').print

°test
this.test

::Foo
	a = 123+2345
	::get = a

Foo[].print		# .get

test_2021-05-13.jmo

props = Tree
props["cost","credit"]? = "0.00"
props["cost","shipping"]? = "2.99"
props["shipping","tracking_no"]? = "DHL SendungsNumber"
props["shipping","date_shipped"]? = "2021-04-22"
props["is_filed"]? = true
props["remarks"]? = "Test" 

props.print

"-----".print

propm = Map
propm.add("cost.credit", "0.00")
propm.add("cost.shipping", "2.99")
propm.add("shipping.tracking_no", "DHL SendungsNumber")
propm.add("shipping.date_shipped", "2021-04-22")
propm.add("is_filed", true)
propm.add("remarks", "Test")

propm.print

"-----".print

Count(3).each => x
	'a'.echo
	x.echo
.echo('b').print

"-----".print

5.pass => abc
	abc.print

test_2021-07-12.jmo

Print (0<<24) + (17<<16) + (0<<8) + 1
n = 1114113; a=n>>24; n-=a<<24; b=n>>16; n-=b<<16; c=n>>8; n-=c<<8; "{}.{}.{}.{}".fill(a,b,c,n).print
n = 1114113; n-=(a=n>>24)<<24; n-=(b=n>>16)<<16; n-=(c=n>>8)<<8; "{}.{}.{}.{}".fill(a,b,c,n).print

"---------------------------------".print

n = 1114113
ba = n.toByteArray
"{}.{}.{}.{}".fill(ba[1],ba[2],ba[3],ba[4]).print
bl = ba.toList
"{}.{}.{}.{}".fill(:bl).print
"{}.{}.{}.{}".fill(ba.toList.toTempLet).print

"---------------------------------".print

ba = ByteArray(4)
ba[1] = 0b
ba[2] = 17b
ba[3] = 0b
ba[4] = 1b
ba.toIdent.print
ba.toInt.print

"---------------------------------".print
Print(5+5).print
Print (5+5).print

"---------------------------------".print

["Rod", "Carlos", "Chris"].each.print
"-----".print
["Rod", "Carlos", "Chris"].each.proc( cur.print )

test_2021-09-02.jmo

s = "Hallo"
s = s[2] = 'o'
Print s

Print '-'*40 ####################################################

::MyTest
	list=[]

	::add(o)
		list.add(o)
		°@newItem( [list, o, 1] )

	::show
		list.print

	::@newItem

l=MyTest

l::@newItem
	"New Item".print
	it.print
	#d.print
	#e.print
	#f.print

l.add( 3 )
l.show

Print '-'*40 ####################################################

::test1(a, b, c=1)
	(a+" "+b+" "+c).print

°test1("a", "b", "c")
°test1("a", "b")

"-----".print

::test2(a, b, Int c=1)
	(a+" "+b+" "+c).print

°test2("a", "b", 3)
°test2("a", "b")

"-----".print

::test3(a, b=2, c=1)
	(a+" "+b+" "+c).print

°test3("a", "b", "c")
°test3("a", "b")
°test3("a")

::test4(a=3, b=2, c=1)
	(a+" "+b+" "+c).print

°test4("a", "b", "c")
°test4("a", "b")
°test4("a")
°test4

"-----".print

::test5(a, b=2, c)
	(a+" "+b+" "+c).print

°test5("a", "b", "c")
°test5("a", "b")

Print '-'*40 ####################################################

[ "Huber", "Müller", "Meier", "Koch" ].sort( :e, e[1,3] > e[2,3] ).print
[ "Huber", "Müller", "Meier", "Koch" ].sort( :e, e[1][3] > e[2][3] ).print

Print '-'*40 ####################################################

5.mem(:aa).add(3).print.print(aa)

Print '-'*40 ####################################################

file = File("/tmp/jmotest_010902.txt")
app.setOutput(file.path, true)
Print "foo"
app.setOutput(file, false)
Print "bar"
app.resetOutput
Print "---"
file.read.print
file.delete

Print '-'*40 ####################################################

"abcdefghi".chars.describe
"abcdefghi".bytes.describe

Print '-'*40 ####################################################

[3..9].each.print

[3..8, 2].print

[4..10].each.print

[1,4,6,8].each
	it.print

"---".print

x=5
9.times
	x.echo
	it.print

"---".print

[1..10].each
	it.print
"---".print
[1..10].unfold.each
	it.print

"---".print

y=4
5.times
	y.print

Print '-'*40 ####################################################

::test( n )
	"---".print
	(0==n).if
		"n".print

this.test( 3 )
this.test( 0 )

test_2021-11-18.jmo

m = Map

m.add( KeyValue( 123, 'a' ) )
m.add( 234 -> 'b' )
m.add( 345.toKeyValue( 'c' ) )

kv = 456 -> 'd'
m.add( kv )

m.print

Print "---------------------------------------------"

IntNumber a = 123
Print( a = 456i )
Print( a = 23b )
Print( a = 45l )
Print( a = 98s )

Print "---"

DecNumber d = 12.34
Print( d = 23.34f )
Print( d = 34d )
Print( d = 45i )
Print( d = 56b )
Print( d = 67s )

test_2021-11-24.jmo

::line
	Print 60*'-'

Print +3
Print -4
Print -infinity + infinity
(-infinity + infinity).print

this.line

pack = "java.util."
class = "ArrayList"
al = Java( pack+class )
al.getClass.getSimpleName.print

this.line

["Eins", "Zwei", "Drei", "Vier", "Fünf"].map( each[3] = 'e' ).print
["Eins", "Zwei", "Drei", "Vier", "Fünf"].map( each + 'o' ).print
["Eins", "Zwei", "Drei", "Vier", "Fünf"].map( each.left(2) ).print

this.line

s = "abcdefghijklmnopqrstuvwxyz"
Count( s.len )
	Print it
	Print s / it

test_block_do_if.jmo

5.pass
	(it+it).print

true.pass
	4.print
.print

false.pass
	3.print
.print

###

(true)
	4.print
.print

(false)
	3.print
.print

t=true
t.pass
	4.print
.print

f=false
f.pass
	3.print
.print

(t)
	4.print
.print

(f)
	3.print
.print

['a','b','c','d','e','f','g','h']
	it.echo
.print

test_capitalize.jmo

s="blafoo"

(s.charAt(1).caseUp + s.start(2)).print

a=s.charAt(1).caseUp + s.start(2)
a.print

s.pass
	it = it.charAt(1).caseUp + it.start(2)
.print

s.proc( cur.mem(:a).charAt(1).caseUp + a.start(2) ).print

s.capital.print

s.capitalFirst.print

test_each_with_func.jmo

::g(n)
	("-"+n).print

4.isEven.if
	this.g(4)

[1..10].each
	this.g(it)

10.times
	this.g(it)

10.times
	°g(it)

10.times => x #(:x)
	°g(x)

['a'..'j'].unfold.each
	it.print

['a'..'j'].unfold.each
	it.toStr.begin("> ").print
.print

['c'..'h'].unfold.each.print

####################################

# Aktuell ungültig
# 3.times(this.g())

test_event_easy.jmo

::MyTest
	list=[]

	::add(o)
		list.add(o)
		°@newItem

	::show
		list.print

	::@newItem

l=MyTest
l::@newItem
	"New Item".print

l.add(12345)
l.show

test_instance_env.jmo

::MyTest
	r=Random.int(10000,99999)
	::get
		§ = r

### Test ###

v1=MyTest.get
v2=MyTest.get

a=MyTest
b=MyTest
v3=a.get
v4=b.get

(v1 != v2).print
(v1 != v3).print
(v1 != v4).print

(v2 != v3).print
(v2 != v4).print

(v3 != v4).print

test_newRelease.sh



for i in *.jmo; do
	echo
	echo "=== Test: $i"
	
	TEST="/tmp/jmo_manual_test.txt"
	#java -jar /home/mike/Prog/Java/Jar/jmo.jar "$i" "7" >$TEST 2>&1
	java -jar /home/mike/Prog/JayMo/build/OUT/jaymo-cli-aio.jar "$i" "7" >$TEST 2>&1
	
	STORED="output/$i.txt"
	if( test -f $STORED; ) then
		diff -q -y $TEST $STORED || kdiff3 $TEST $STORED
	else
		cp $TEST $STORED
	fi
	
done

test_newRelease.sh



for i in *.jmo; do
	echo
	echo "=== Test: $i"
	

	java -cp "/home/mike/Prog/JayMo/build/OUT/jaymo-cli-aio.jar" org.jaymo_lang.cli.Main_JayMo_CLI "$i"

done

test_prio_do.jmo

(2+4*3).print.add(3).pass
	a=it+2
	a.print

test_quicksort_detail.jmo

::test(List list) List
	"---".print

	( list.len <= 1 )
		§= list

	list = list.copy

	("listlen: "+list.len).print
	#v = °qsort( list.filter( $$ < list[1] ) ) ++ °qsort( list.filter( $$ >= list[1] ) )
	#v.print
	#§< v
	#§< °qsort( list.filter( $$ < list[1] ) ).print

	p = list.first
	("P1: "+p).print
	r = list.start(2)
	a = r.filter( each <= p )
	b = r.filter( each > p )

	#c = a.copy+p++b
	("a1: "+a).print
	("b1: "+b).print
	#(run+"c1: "+c).print

	a = °test(a)
	b = °test(b)

	("P2: "+p).print
	("a2: "+a).print
	("b2: "+b).print
	#c = a.copy+p++b		# TODO Priorität
	c = (a.copy +p)++b
	("c2: "+c).print
	§= c

l = [16, 23, 14, 7, 21, 20, 6, 1, 17, 13, 12, 9, 3, 19]
l.print

l = °test(l)
l.print

test_spaces.jmo

::   MyType(   Int   i   =   3   ,   Int   j   =   9   )   =   test
	::   test(   Char   c   =   'a'   )   Str   =   c   *   5   .print

MyType(   1   ,   2   )   .test(   'z'   )   .print

##########################################################################

::MyTest(Int i=3,Int j=9)=test
	::test(Char c='a')Str=c*5.print

MyTest(1,2).test('z').print

textblock.jmo

""""
<?php

ini_set('display_errors', 'On');

"""".print

""""
<?php
ini_set('display_errors', 'On');

"""".print

this.jmo

::doit
	"Go!".print
	
°doit
this.doit

this_sleep.jmo

# Sys.sleep(1000)
#   wieder:
# this.sleep(1000)

# Es soll ja nicht das System schlafen ... nur der aktuelle Thread!
# This, da der aktuelle Thread pausieren soll, nicht das System.

Print 1
°_sleep 1000
Print 2
this._sleep( 2, 0 )
Print 3

time.jmo

::test(Time tx)
	"--- {} ---".fill(tx).print
	tx.print
	tx.hour.print
	tx.min.print
	tx.sec.print
	tx.style("hh.mm").print

°test( Time(23,45,12) )

°test( Time("07:13:54") )

"----------".print
t = Time
(t.hours < 24)
	"ok".print

"----------".print

t1 = Time(6, 45, 8)
t2 = Time(9, 13, 21)

t1.diffSeconds(t2).print
t1.diffMinutes(t2).print
t1.diffHours(t2).print

t2.diffSeconds(t1).print
t2.diffMinutes(t1).print
t2.diffHours(t1).print

t1.toStr.print

(t1 == t2).print
(t1 != t2).print
(t1 > t2).print
(t1 >= t2).print
(t1 < t2).print
(t1 <= t2).print

times.jmo

3.times.echo
10.times.echo
1.times.print

### Keine Ausgabe

5.times #(2)

### Früher: Ausgabe nur 1x, da Argument
3.times.proc(2.print)
# 3.times 2.print #Deaktiviert
3.times.proc(2.print)

### Ausgabe 4x
3.times.proc(2.print).echo

### Block
5.times
	3.echo
"".print
5.times
	it.print

### Argument ausgeben
5.times.proc(2).echo
5.times.proc(2+1).echo
"".print

### Komplex
('-'*30).print
(5.times.print+5*3.print).print		# Ergebnis=20  Korrekt!!!
5.times.print+5*3.print		# Korrekt, Ergebnis wird nicht ausgegeben

times_2.jmo

5.times
	it.timesDown
		it.times
			it.echo
		"".print
	"---".print

times_3.jmo

2.times
	(4+1).times
		123.print
	
	'y'.echo
	3.times
		'a'.print

times_it.jmo

# Erzeugen korrekt Fehler:

##########################

5.times.proc(9.print)

3.times.proc(4.echo).print

5.times
	3.times.proc(it).pass
		it.echo
	"<".print

5.times.proc(4.echo).pass
	it.echo
"".print

5.times
	(124+it).toHex.print

times_it2.jmo

>lazyErrors

# Erzeugt Fehler:
°try
	5.times.proc(each.print)
.catch.detail.print

°try
	5.times.proc(it).print
.catch.detail.print

# Kein "it" vorhanden, wirft Fehler

time_2020-01-20.jmo

a=Time("12:34:56")
a.print

"---".print

a=++
a.print
a.inc.print
a.print

"---".print

a=--
a.print
a.dec.print
a.print

"---".print

a++=3
a.print
a.inc(3).print
a--=3
a.print
a.dec(3).print

"------ Limit".print

l=Time("12:34:56")
l.limit( Time("13:34:45"), Time("21:32:43")).print
l.limit( Time("10:11:12"), Time("21:32:43")).print
l.limit( Time("10:11:12"), Time("11:12:13")).print

"------ Add Sub".print

b = Time("12:34:56")
b.print
b=b+2
b.print
b=b-2
b.print
b+=4
b.print
b-=2
b.print

time_2020-02-10.jmo

t = Time(11,22,33)
t.print

"---".print

t=t+1
t.print
t+=1
t.print
t=t.add(1)
t.print

"---".print

t=t-1
t.print
t-=1
t.print
t=t.sub(1)
t.print

"---".print

t=t.subMin(1)
t.print
t=t.subMinutes(1)
t.print
t=t.subHours(1)
t.print
t=t.subHours(1)
t.print

time_4.jmo

Time.toStr.len.print
Time(9).print
Time(9,2).print
Time(9,2,45).print
Time("13:24:35").print

time_msek.jmo

a = Time(12,34,56).print.ident
Print "-----"
b = Time( 12, 34, 56, 789 ).print.ident
Print "-----"
c = Time("12:34:56.789").print.ident
Print "-----"
d = Time("12:34:56").print.ident
Print "-----"
e = Time("12:34").print.ident

Print "--- 1 -----------------"

a.getMSec.print
b.getMilliSeconds.print
b.getMSec.print
b.mSec.print

Print "--- 2 -----------------"

b.ident.addMSec(234).print.ident
Print "-----"
b.ident.subMSec(234).print.ident
Print "-----"
c.ident.addMilliSeconds(3456).print.ident

Print "--- 3 -----------------"

c.ident
Ident c + 5
Print "---"
c.ident
Ident c + 5.123
Print "---"
c.ident
Ident c - 5
Print "---"
c.ident
Ident c - 5.123

Print "--- 4 -----------------"

c.ident
c += 5
c.ident

Print "---"

c.ident
c -= 5
c.ident

Print "---"

c.ident
c += 5.123
c.ident

Print "---"

c.ident
c -= 5.123
c.ident

Print "--- 5 -----------------"

c = Time("12:34:56.789")
c.ident
c.addTime( Time( 1, 2, 3, 4 ) ).ident
c.ident
c.subTime( Time( 1, 2, 3, 4 ) ).ident

torus_count.jmo

::MyCount(Number start, Number end?=nil, Number step=1)!! = each
	this._init
	
	(end == nil)
		end = start
		start = 1
	
	::each()!!
		init = true
		
		num = start
		now = num
		b = num <= end
		
		:b.while
			(init)
				init = false
				func.exportLoop

			now = num
			num += step
			b = num <= end

			func.push(now)
			
		func = now

#####################################################

Count( 12, 19 )
	If(it == 13)
		Next
	If(it == 15)
		loop.next
	If(it == 17)
		loop.break
	it.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

"---".print
Count(3).each.print
"---".print
Count(0,10,5).each.print

# Result: 10

"------------------------".print

MyCount( 12, 19 )
	If(it == 13)
		Next
	If(it == 15)
		loop.next
	If(it == 17)
		loop.break
	it.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

"---".print
MyCount(3).each.print
"---".print
MyCount(0,10,5).each.print

# Result: 10

torus_describe.jmo

::MyDescribe(args...)!!
	this._init
	#args.each.echo
	#"".print
	args.each.describe

###############################################

"-----".print
Describe
Describe "xyz"
Describe("abc")
Describe(1,'a',"5")
"-----".print
MyDescribe
MyDescribe "xyz"
MyDescribe("abc")
MyDescribe(1,'a',"5")
"-----".print

torus_echo.jmo

::MyEcho(args...)!!
	this._init
	args.each.echo

###############################################

"-----".print
Echo
Echo "xyz"
Echo("abc")
Echo(1,'a',"5")
Print
"-----".print
MyEcho
MyEcho "xyz"
MyEcho("abc")
MyEcho(1,'a',"5")
Print
"-----".print

torus_exit_1.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

Exit

"bbb".print

torus_exit_2.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

Exit 0

"bbb".print

torus_exit_3.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

Exit(2)

"bbb".print

torus_exit_4.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

MyExit

"bbb".print

torus_exit_5.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

MyExit 0

"bbb".print

torus_exit_6.jmo

::MyExit(Int arg = 0)
	app.exit(arg)

"aaa".print

MyExit(2)

"bbb".print

torus_if.jmo

::MyIf(Bool b)!! = then
	this._init
	
	::then()!!
		(b)
			func.push(true)
		.else
			func.pushStream(false)

###############################################

::test( Bool b1, Bool b2)

	If( b1 )
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print
	If( b1 ).then
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print

	"----------".print

	MyIf( b1 )
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print
	MyIf( b1 ).then
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print

#################################################

this.test( true, true )
"==========".print
this.test( true, false )
"==========".print
this.test( false, true )
"==========".print
this.test( false, false )

torus_ifnot.jmo

::MyIfNot(Bool b)!! = then
	this._init
	
	::then()!!
		(b.not)
			func.push(true)
		.else
			func.pushStream(false)

###############################################

::test( Bool b1, Bool b2)

	IfNot( b1 )
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print
	IfNot( b1 ).then
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print

	"----------".print

	MyIfNot( b1 )
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print
	MyIfNot( b1 ).then
		'a'.print
	.else( b2 )
		'b'.print
	.else
		'c'.print

#################################################

this.test( true, true )
"==========".print
this.test( true, false )
"==========".print
this.test( false, true )
"==========".print
this.test( false, false )

torus_loop.jmo

::MyLoop()!! = each
	::each()!!
		#this._createLoop
		
		c = 0
		init = true
		b = true
		
		#While(true).each
		:b.while
			(init)
				init = false
				func.exportLoop
			#loop.newLap
			c =++
			func.push(c)
			
		func = c

#####################################################

counter = 10
Loop
	counter=++
	If(counter == 12)
		Next
	If(counter == 14)
		loop.next
	If(counter == 16)
		Break
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: 6

"------------------------".print

counter = 10
MyLoop
	counter=++
	If(counter == 12)
		Next
	If(counter == 14)
		loop.next
	If(counter == 16)
		Break
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: 6

torus_print.jmo

::MyPrint(args...)!!
	this._init
	#args.each.echo
	#"".print
	args.each.print

###############################################

"-----".print
Print
Print "xyz"
Print("abc")
Print(1,'a',"5")
"-----".print
MyPrint
MyPrint "xyz"
MyPrint("abc")
MyPrint(1,'a',"5")
"-----".print

torus_repeat.jmo

::MyRepeat(Bool b)!! = each
	this._init

	::each()!!
		init = true
		first = true
		
		:b.repeat
			(init)
				init = false
				func.exportLoop
			.else
				this._init
			(first || b)
				func.push(b)
			first = false
			
		func = b

#####################################################

counter = 10
Repeat( counter.print < 18 )
	counter=++
	If(counter == 13)
		Next
	If(counter == 16)
		loop.next
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: false

"---".print
Repeat(false)
	"once".print

"------------------------".print

counter = 10
MyRepeat( counter.print < 18 )
	counter=++
	If(counter == 13)
		Next
	If(counter == 16)
		loop.next
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: false

"---".print
MyRepeat(false)
	"once".print

torus_which.jmo

::MyWhich(Bool args...) = get
	::get()!!
		LEN = args.len
		val? = nil
	
		{LEN} => p
			(args[p])
				val = p
				loop.break

		#"Debug: {} --> {}".fill(args,val).print
		func = func.push(val)

####################################################################################

['A','D','G','Y','P','T', 't','$','4'].each => item
	type2 = Which( item <= "F", item <= "L", item <= "R", item <= "X", true ).get
	type2.echo
	", ".echo
Print

['A','D','G','Y','P','T', 't','$','4'].each => item
	type2 = MyWhich( item <= "F", item <= "L", item <= "R", item <= "X", true ).get
	type2.echo
	", ".echo
Print

"------------------------".print

['A','D','G','Y','P','T', 't','$','4'].each => item
	Which( it <= "F", it <= "L", it <= "R", it <= "X")
		it.echo
Print

['A','D','G','Y','P','T', 't','$','4'].each => item
	MyWhich( it <= "F", it <= "L", it <= "R", it <= "X")
		it.echo
Print

"------------------------".print

[1,2,3,4,5].each => item2
	Which( item2 < 2, item2 < 4, item2 == 4, item2 > 4 )
		it.echo
Print

[1,2,3,4,5].each => item2
	MyWhich( item2 < 2, item2 < 4, item2 == 4, item2 > 4 )
		it.echo
Print

torus_while.jmo

::MyWhile(Bool b)!! = each
	this._init
	::each()!!
		init = true
		
		:b.while
			(init)
				init = false
				func.exportLoop
			.else
				this._init
			(b)
				func.push(b)
			
		func = b

#####################################################

counter = 10
While( counter.print < 18 )
	counter=++
	If(counter == 13)
		Next
	If(counter == 16)
		loop.next
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: false

"------------------------".print

counter = 10
MyWhile( counter.print < 18 )
	counter=++
	If(counter == 13)
		Next
	If(counter == 16)
		loop.next
	counter.echo
	"-".echo
	loop.lap.print
.print(cur+'x')

# Result: false

toStr.jmo

5.toStr.print
'a'.toStr.print
"foo".toStr.print
3b.toStr.print
9l.toStr.print
4.5.toStr.print
false.toStr.print
nil.toStr.print

Random.toStr.print

app.print
app.toStr.print
°.toStr.print
°print

::test
	§.print
	§toStr.print
°test

1.times
	loop.print
	loop.toStr.print

toStr_toStrExt_toStrFull.jmo



::show( o )
	"{5<} | {5<} | {<}".fill(o, o.toIdent, o.toDescribe).print

::func( Int i )
	Print "--- " + i + " ---------------------------"
	#this.show( i.toNil )
	this.show( i.toBool )
	this.show( i.toByte )
	this.show( i.toShort )
	this.show( i.toInt )
	this.show( i.toLong )
	this.show( i.toFloat )
	this.show( i.toDec )
	this.show( i.toChar )
	this.show( i.toStr )

this.func( 0 )
this.func( 1 )
this.func( 2 )

################################################

"-------------------------------------".print
tree = >>>>
node1
	node11
	node12
node2
	node21
node3
	node31
		node311
		node312
<<<<

tree.describe
"-----".print
tree.toDescribe.print

toStr_toStrIdent_describe.jmo

::show(Object o)
	o.toStr.print
	Print "-----"
	o.toIdent.print
	Print "-----"
	o.toDescribe.print
	Print "-----"
	o.describe
	Print "-------------------------------------------------------"

this.show( 5 )
this.show( 9b )

this.show( 'c' )
this.show( "d" )

l = [4b,8s,9,1l,'3',"5",6b,7s,0,3l]
this.show( l )

t=Table(2).add("foo","bar").add("abc","xyz")
this.show( t )

r = >>>>
foo
	bar: 1b
bak: 2s
abc: 3
	def: 4l
	ghi: '5'
		jkl: "6"
		mno: 7b
	pqr: 8s
stu: 9
	vwx: 0l
<<<<
this.show( r )

Print "++++++++++++++++++++++++++++++++++++++++++++++++++"

Print 5b.toStr
Print 5b.toIdent
Print 5b.toDescribe

tostr_override_cascade.jmo

::ItemColor
	Int? item = nil
	Int? color = nil
	
	::setItem(Int i)
		item = i
	::getItem = item
	
	::setColor(Int i)
		color = i
	::getColor = color

	::toStr = this.toIdent + '$'
	::toIdent = item.toStr + ':' + color.toStr
	::toDescribe = this.toIdent + '%'

i1 = ItemColor
i1.color = 5
i1.item = 2

Print i1
Ident i1
Describe i1

treeblock_1.jmo

tree = >>>>
	item
		no: 123
		name: "foo"
		type: "PART"
	color_id = 81
	new_or_used: "U"
	quantity = 11
	sale_rate = 75
	unit_price = 1.23
	<<<<

"----------".print
tree.print
"----------".print
tree.print

"==================================".print

x = 987

>>>>
abc = 'a'
def = x
	uvw
	xyz
	efg:3
		ghi
		hij : '*'
			ijk
	fgh = x*4
qrs = x+x
	rst = x.print
<<<< => t2
"----------".print
t2.print

treeblock_2.jmo

tree = Tree
item = "item"

tree.build( TreeNode(item, nil, TreeNode("no",123), TreeNode("name","foo"), TreeNode("type","PART")), TreeNode("color_id",81))
tree.print
tree.print

treeblock_3.jmo

>>>>
	item
		no: 123
		name: "foo"
		type: "PART"
	color_id = 81

	new_or_used: "U"
		quantity = 11
	sale_rate = 75

	unit_price = 1.23

	<<<<.print

tree_1.jmo

t = Tree
t.add("Foo")
t.add("Bar")
t.add("Bak")
t.print

"-----".print

t.get("Foo").add("Boo")
t.get("Bak").pull("Xar").pull("Xak")
t.get("Foo").add("Moo")
t.print

"-----".print

t["Bar","Tar","Zar"]?
t["Foo","Too","Zoo"]?
t["Bak","Xar","Zak"]?.add("Tak")
t.print

"-----".print
t["Bar","Tar","Zar"]?.name.print
t["Bar","Tar","Zar"]?.value.print
t["Bar","Tar","Zar"]?.print
t["Bar","Tar","Zar"]?.value = "Zzz"
t["Bar","Tar","Zar"]?.print
"--".print
t.get("Bar").print

"-----".print
t.set("111", "Bak")
t["Bak"].name = "123"
t["Bar"].name = "234"
t["123","Xar","Zak","Tak"] = "345"
t["123","Xar","Zak"] = "456"
t["123","Rar","000"]? = "567"
t.print

"-----".print
t.delete("234").print
"-----".print
t.remove("Xak", "Too", "Boo").print

"-----".print
t.print
"-----".print
Try
	t.value = "xyz"
.catch.info.print

tree_2.jmo

t = Tree
t.add("foo")
n1 = t.get("foo")
t.print
"-----".print
n1.name.print
n1.name = 7
n1.name.print
"--".print
n1.value.print
n1.value = 4
n1.value.print
"--".print
n1.print
"--".print
t.print
"-----".print
t[2,5,3,9]? = 'a'
t[2,5] = 'b'
t[2,5].add(8).value = 'c'
t.print
"-----".print
t[7].addNodes(2,4,6,8).add(9).value='d'

t.print

tree_3.jmo

Tree tree = >>>>
	html
		font-size: 100%
		overflow-y: scroll
		-webkit-text-size-adjust: 100%
		-ms-text-size-adjust: 100%
	body
		margin: 0
		font-size: 100%
		line-height: 1.5
	b, strong
		font-weight: bold

	#primary-nav
		select
			margin: .5em 1em
			width: 90%

	@media only screen and (min-width: 768px)
		body
			background: #F6EFE9
			padding: 1em 0

		#page
			border: 1px solid #aaa
			margin: 0 auto 1em
			max-width: 70em
			width: 96%
			-webkit-box-shadow: 0 0 10px 1px rgba(0,0,0,.2)
			-moz-box-shadow: 0 0 10px 1px rgba(0,0,0,.2)
			box-shadow: 0 0 10px 1px rgba(0,0,0,.2)

		#searchform
			div
				margin-top: 4.4em
		.sidebar_plugin, .lt-ie8 .sidebar_plugin
			float: none
			width: auto
<<<<?

tree.print
"------------------".print

tree["body", "padding-top"]? = "10px"

tree.print

tree_4.jmo

t = Tree

t.add("Foo")
t.add("Bar")
t.add("Bak")

t.get("Foo").add("Boo")
t.get("Bak").pull("Xar").pull("Xak")
t.get("Foo").add("Moo")

t["Bar","Tar","Zar"]?
t["Foo","Too","Zoo"]?
t["Bak","Xar","Zak"]?.add("Tak")

t.set("111", "Bak")
t["Bak"].name = "123"
t["Bar"].name = "234"
t["123","Xar","Zak","Tak"] = "345"
t["123","Xar","Zak"] = "456"
t["123","Rar","000"]? = "567"

t["123","Rar","000"].value = 'a'
t["Foo","Moo"].value = 'b'
t["123","Xar"].value = 'c'
t["123","Xar","Zak"].value = 'd'

t.print
"-----".print
t.removeValues('b','c','d').print
"-----".print
t.removeNames("Xak", "Too", "Boo").print

tree_add.jmo

t = Tree
t.add( "foo", 9 )
t.add( "abc" ).add( "def", 3)

t.print
"-----".print
t.print

tree_keyvalue.jmo

kv1 = "abc" -> 123
kv2 = "bcd" -> 234
kv3 = "cde" -> 345

t = Tree
t.add kv1
t.add(kv2).add kv3

n = t.add( "Foo" )
n.add( "def" -> 456 )

n.add( "efg" -> 567 )

Describe t

tryStream_store_in_var.jmo

Try
	a = 4.try.print.lkj.print
	a.catch.detail.begin("Detail: ").print
	it = a
.catch
	"Catch".print
	it.detail.print
	it = 3
.print

('-'*30).print

Try
	a = 4.try.print
	a.catch.detail.begin("Detail: ").print
	it = a
.catch
	"Catch".print
	it.detail.print
	it = 3
.print

typenames.jmo

true.type.print
'a'.type.print
1.2.type.print
1.type.print
"Foo".type.print

File("test.txt").type.print
Dir("/").type.print

# PI.type.print	 # Error, uninitialized
PI=3
PI.type.print

# a.type.print	 # Error, uninitialized
a=2
a.type.print
(1+2).type.print

°.type.print
nil.type.print
`echo 1`.type.print
`echo 2`o.type.print
`echo 3`b.type.print
Cmd("echo 1").buffer.type.print

Random.type.print

types_1.jmo

"Lets start".print

::guru
	"guru-wow".print

"Run".print

this.guru
°guru
"Finish".print

types_2.jmo

::Greeter
	who="Welt"
	
	::hello
		("Hallo " + who).print
		
	::bye
		("Tschüss "+ who).print

### Test ###

Greeter.hello
Greeter.hello.print

g=Greeter
g.hello
g.bye

types_3.jmo

"Lets start".print
::Uff
::Bla
	::guru
		"guru-wow".print
		true.if
			"TRUE".print
"Run".print
Bla.guru
"Finish".print

types_4.jmo

::test
	"Here is Root".print
	°print
°test

::MyType
	::test
		"Here is MyType".print
		°print
	
	°test

°test
MyType.test

types_5.jmo

"Lets start".print
::Bla
	::guru(Int a)
		("guru-nr: "+ a*2).print
		true.if
			"TRUE".print
"Run".print
Bla.guru(3)
Bla.guru(4)
x=Bla
x.guru(3)

"Finish".print

types_6.jmo

::Auto(Int i? = 3)
	"Brumm".print
	i?.print
	
	::fahren
		"Bwwww".print
		
	::hupen
		"Mööp".print
		
	::bremsen
		"Quietsch".print

Auto(5)
Auto()
Auto

Try
	Auto('a')
.catch.message.print

Auto(nil)

Auto
Auto
Auto.print
Auto.type.print

Auto.type.print

"-----".print

a = Auto
a.fahren
a.hupen
a.bremsen

"---".print

Auto.fahren
Auto.hupen
Auto.bremsen

"---".print
Auto(1).print

types_8.jmo

::MyTest01
	"01".print
	
::MyTest02()
	"02".print
	
::MyTest03()!!
	"03".print
	
::MyTest04()
	"04".print
	
::MyTest05()!!
	"05".print
	
::MyTest06()!!
	"06".print
	
::MyTest07()!!
	"07".print
	
::MyTest08(    )
	"08".print
	
::MyTest09(    )!!
	"09".print
	
::MyTest10()
	"10".print
	
::MyTest11()!!
	"11".print
	
::MyTest12()!!
	"12".print
	

"lkjlkj".left(2) .print

MyTest01
MyTest02
MyTest03
MyTest04
MyTest05
MyTest06
MyTest07
MyTest08
MyTest09
MyTest10
MyTest11
MyTest12

types_constructor.jmo

::Greeter(Str who)
	::hello
		("Hallo " + who).print
		
	::bye
		("Tschüss "+ who).print

# Test

Greeter("Gustav").hello
Greeter("Paul").hello.print

g1=Greeter("Dieter")
g1.hello

g2=Greeter("Otto")
g2.hello

g1.bye
g2.bye

types_default_func.jmo

::MyType(Int nr)=run
	::func
		"Func".print
	::run
		("Run: "+nr).print
	
	"Constructor".print

m = MyType(4)
m.print
m.func
m.run
m.run #.do

"--- 1 ---".print

Try
	m
		6.print
		it.print
.catch
	it.message.print
	it.detail.print

"-".print

Try
	m.run
		6.print
		it.print
.catch
	it.message.print
	it.detail.print

"-".print

m

"-".print

MyType(2)

"--- 2 ---".print

::MyType2
	::foo
		"Foo".print
		
MyType2.foo

Try
	MyType2.foo		#.do
.catch.message.print

"--- 3 ---".print

::MyType3
	::bar
		"Bar".print
		
MyType3.bar

Try
	MyType3.bar		#.do
.catch.message.print

types_default_func2.jmo

::MyType(Int nr)=for
	::for(Int count)!!Int
		func.init
		("Count: "+count).print
		{count}
			#it = func.execBlock(it).print
			#§ = func.execStream(it).print
			§ = func.push(it).print

m = MyType(4)
m.print
m.for(3)

Try
	m.for
		6.print
		it.print
.catch.message.print

m

MyType(2)
MyType(1).print

Try
	MyType(5)
		"Block".print
		it.print
	.print("Stream").print
.catch.message.print

"###".print
m.for(3)
	it.print

m.for(5).print

"###".print
m.for(3)
	it.print

m.for(5).print

type_check.jmo

a = 'a'

a.type.print

"---".print

If(a.type == "Int")
	"Is Int".print
.else
	"Is not Int".print

If(a.type ==~ "Char")
	"Is Char".print
.else
	"Is not Char".print

"---".print

a.isType("Int").print
a.isType("Char").print

"---".print

Try
	a.assertType("Int").print
.catch.detail.print
Try
	a.assertType("Char").print
.catch.detail.print

type_check_2.jmo

a = 5

a.isType("Int").print
a.isType("Str").print
a.isType("Atomic").print
a.isType("Object").print
Try
	a.isType("abc").print
.catch.info.print

"-----".print

a.assertType("Int").print
Try
	a.assertType("Str").print
.catch.info.print
a.assertType("Atomic").print
a.assertType("Object").print
Try
	a.assertType("abc").print
.catch.info.print

type_extends_1.jmo

::Foo
	::foo
		"Foo".print

::Bar^Foo
	::bar
		"Bar".print

Foo.foo
Bar.bar
Bar.foo

type_extends_2.jmo

::Foo(Int i)
	::foo
		("Foo"+i).print

::Bar^Foo(2)
	::bar
		"Bar".print

Foo(1).foo
Bar.bar
Bar.foo

type_extends_3.jmo

::Foo(Int i)
	::foo
		("Foo"+i).print

::Bar(i)^Foo(i)
	::bar
		("Bar"+i).print

Foo(1).foo
Bar(2).bar
Bar(3).foo

type_extends_4.jmo

::Foo(Int i, Int j)
	::foo
		("Foo"+(i+j)).print

::Bar(i)^Foo(i,5)
	::bar
		("Bar"+i).print

Foo(1,8).foo
Bar(2).bar
Bar(3).foo

type_extends_5.jmo

::Foo(Int i) ^ Date("2021-04-03")
	::foo
		("Foo"+this.addDays(i)).print

Foo(9).foo
Foo(123).foo
Foo(234).getYear.print
Foo(345).inc(3).print
Foo(456).addDays(20).print

type_extends_6.jmo

:: MyClass(a,b) ^ List(b,a) = foo
	:: foo
		"FOO: {},{}".fill(a,b).print

MyClass(4,7).foo

m = MyClass(5,8)
m.print
m.len.print

m.add(9)
m.len.print
m.implode('-').print
m.foo

type_extends_7.jmo

:: MyList(a,b) ^ List(b,a)
	this.add( 9 ).implode('a').print
	this.implode('b').print
	

	::toStr = this.implode('s')

MyList(1,2).print

Print "-----"

m = MyList(3,4)
m.print
m.add(5)
m.print

type_extends_8.jmo

:: MyList(a,b) ^ List(b,a)
	this.add( 9 ).implode('a').print
	this.implode('b').print
	super.toStr.print
	this.toStr.print
	"---".print
	

	::toStr = this.implode('s')

MyList(1,2).print

Print "----------"

m = MyList(3,4)
m.print
m.add(5)
m.print

type_names.jmo

"lkj".type.print
5.type.print
'c'.type.print

"-----".print

Str s1 = "abc"
s1.type.print

Int i1 = 4
i1.type.print

Char c1 = 'a'
c1.type.print

type_par_default.jmo

::Auto(Int a= 1, Int b=2, c=3)
	"A: ".add(a).print
	"B: ".add(b).print
	"C: ".add(c).print
	"---".print

Auto(4,5,6)
Auto(7,8)
Auto(9)
Auto()
Auto

uri_1.jmo

::test(Str s)
	Print "-----------------------------------------------------"
	uri = Uri(s)

	Print "--- URI ---"
	uri.print
	uri.ident
	uri.describe

	Print "--- Read ---"
	uri.scheme.describe
	uri.authority.describe
	uri.path.describe
	uri.query.describe
	uri.fragment.describe
	uri.host.describe
	uri.port.describe
	uri.userInfo.describe

	Print "--- Get ---"
	uri.getScheme.describe
	uri.getAuthority.describe
	uri.getPath.describe
	uri.getQuery.describe
	uri.getFragment.describe
	uri.getHost.describe
	uri.getPort.describe
	uri.getUserInfo.describe

	Print "--- Set ---"
	uri.describe
	uri.setScheme("ftp").describe
	uri.setAuthority("test:Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein.:1234").describe
	uri.setPath("/new/path").describe
	uri.setQuery("name=foo").describe
	uri.setFragment("see").describe
	uri.setHost("www.mn77.de").describe
	uri.setPort(2345).describe
	uri.setUserInfo("foo").describe
	uri.setUserInfo("name", "pass").describe

this.test( "https://user:Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein.:7890/path/to/file.html" )
this.test( "https://user:Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein.:6789/path/to/file.html?sort=name&align=left#show" )

uri_2.jmo

Uri( "http://www.jaymo-lang.org/download" ).describe
Uri( "http", "www.jaymo-lang.org", "/download", "see" ).describe
Uri( "http", "user:Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein.:2345", "/download", "order=age", "see" ).describe
Uri( "http", "user:secret", "www.jaymo-lang.org", 1234, "/download", "order=name", "see" ).describe

use_1.jmo

::myUse(Bool b=cur, o1, o2)!!
	func.init(1)
	(b)
		func.init(2)
		§ = func.push(o1)
	.else
		func.init(3)
		§ = func.push(o2)

°.myUse(3==3, 1,2).print
°.myUse(3==2, 1,2).print

"------------------".print

::foo(Int i)
	BASE = "abc"
	
	x = BASE.len.equals(i).use(1,2).echo
	x.print
	"---".print
	#x = BASE.div(cur.len == i, 1.echo).proc(2).echo
	#x.print
	#"---".print
	b = BASE.len == i
	x = b.use(1,2).echo
	x.print
	"---".print
	x = BASE.proc(:d, (d.len == i).use( 1, 2 ) ).echo
	x.print
	"---".print
	x = BASE.proc(:d, (d.len == i).use( 1, 2 ) ).echo
	x.print
	"---".print
	x = BASE.use(cur.len == i, 1, 2).echo
	x.print

°foo(3)
"----------".print
°foo(2)
"----------".print

nil.ifNil.print
nil.ifNotNil.print

nil.nilUse(1,2).print
'a'.nilUse(1,2).print
nil.typeUse("Nil", 1, 2).print
'a'.typeUse("Nil", 1, 2).print
'a'.typeUse("Char", 1, 2).print
'a'.use(cur == 'a', 1, 2).print
'a'.use(cur != 'a', 1, 2).print

v08_11_alone.jmo

Random
Group(3.print+4)
If(false.print)
Use(true, 4.print, 5.print)
Count(3.print,9.print,2.print)
Cmd("echo 4".print)
Range(3, 9.print)
a=true; While(a.print)
Count(3.print,5)
List(3,6.print,9,2)

v08_12_asPar.jmo

2.print(Random)
2.print(Group(3.print+4))
2.print(If(false.print))
2.print(Use(true, 4.print, 5.print))
2.print(Count(3.print.print,9.print,2.print))
2.print(Cmd("echo 4".print))
2.print(Range(3, 9.print))
a=true; 2.print(While(a.print))
2.print(Count(3.print,5.print))
2.print(List(3,6.print,9,2))

v08_13_print.jmo

Random.print
Group(3.print+4).print
If(false.print).print
Use(true, 4.print, 5.print).print
b=3
Count(b.print.print,9.print,2.print).print
Cmd("echo 4".print).print
Range(3, 9.print).print
a=true; While(a.print).print
Count(3.print,5.print).print
List(3,6.print,9,2).print

v08_14_stream.jmo

Random.int(1,10).isBetween(1,10).print
Group(3.print+2).get.print
If(false.print.not).then.print
Use(true.print,4.print,5.print).get.print
Count(3.print,9.print,2.print).each.print
Cmd("echo 4".print).print
Cmd("echo 4".print).buffer.print
Cmd("echo 4".print).buffer.print.out.print
Range(3, 9.print).toList.print
a=true; While(a.print).each.print(:a.set(false).get)
Count(3.print,5).each.print
List(3,6.print,9,2).each.print

v08_15_block.jmo

°try
	Random
		it.print
.catch.message.print

Group(true.print).get
	5.print
	it.print
If(false.print)
	it.print
If(true.print)
	it.print
Use(true, 4.print, 5.print)
	it.print
Count(3.print,9.print,2.print)
	it.print
Cmd("echo 4".print).buffer.pass
	it.print
	it.out.print
Range(3, 9.print)
	it.print
a=true
While(a.print)
	it.print; a=false
Count(3,5)
	it.print
List(3,6,9,2)
	it.print

v08_16_doStream.jmo

Random.pass.print
5.pass.print
Group(true.print).get.print
Group(3.print+9).get.print
If(true.print).then.print
If(false.print).then.print
Use(true, 4.print, 5.print).get.print
Count(3.print,9.print,2.print).each.print
Cmd("echo 4".print).pass.print
Range(3, 9.print).each.print
a= true; While(a.print).each.print(a=false)
Count(3,5).each.print
List(3,6,9,2).each.print

v08_17_doBlock.jmo

Random.pass
	it.print
Group(true.print).get
	5.print
	it.print
Group(3.print.add(2).toBool).get
	it.print
If(false.print).then
	it.print
If(true.print).then
	it.print
Use(true, 4.print, 5.print).get
	it.print
Count(3.print,9.print,2.print).each
	it.print
Cmd("echo 4".print).buffer.pass
	it.print
	it.out.print
Range(3, 9.print).each
	it.print
a= true
While(a.print).each
	it.print; a=false
Count(3,5).each
	it.print
List(3,6,9,2).each
	it.print

v08_21_sc_alone.jmo

(3.print+4)
(true.print)
Try
	{3.print, 9.print, 3.print}
.catch.info.print

a=true
While(a.print)

[3,5.print,8,9.print]
true.print.use(3.print, 4.print)
2..8
´echo 4´

v08_22_sc_asPar.jmo

2.print((3.print+4))
2.print((true.print))
Try
	2.print({3.print, 9.print, 3.print})
.catch.info.print
a=true; 2.print(While(a.print).each)
2.print([3,5.print,8,9.print])
2.print(true.print.use(3.print, 4.print))
2.print(2..8)
2.print(´echo 4´)

v08_23_sc_print.jmo

(3.print+4).print
(false).print
(true).print
{3.print, 9.print, 3.print}.print
a=true; While(a.print).each.print(a=false)
[3,5.print,8,9.print].print
true.print.use(3.print, 4.print).print
2..8.print
(2..8).print
´echo 4´.print

v08_24_sc_stream.jmo

(3.print+4).add(3).print
(true.print).pass.not.print
{3.print, 9.print, 3.print}.print
a=true; While(a.print).each.echo('b').print(a=false)
[3,5.print,8,9.print].each.print
true.print.use(3.print, 4.print).add(2).print
2..8.print
(2..8).print
´echo 4´.print

v08_25_sc_block.jmo

((3.print+4).toBool)
	it.print
(true.print)
	it.print
.else
	it.print
{3.print, 9.print, 3.print}
	it.print
a=true
While(a)
	it.print
	a=false
[3,5.print,8,9.print]
	it.print
true.print.use(3.print, 4.print)
	it.print
2..8
	it.print
´echo 4´.pass
	it.print

v08_26_doStream.jmo

(3.print+4).each.print
"---".print

"---".print
{3.print, 9.print, 3.print}.each.print
"---".print

"---".print
[3,5.print,8,9.print].each.print
"---".print
true.print.use(3.print, 4.print).each.print
"---".print
2..8.each.print
"---".print
(2..8).each.print
"---".print

v08_26_goStream.jmo

(3.print+4).pass.print
(true.print).pass.print
{3.print, 9.print, 3.print}.pass.toStr.begin("-> ").print
a=true; While(a).each.pass.print(a=false)
[3,5.print,8,9.print].pass.print
true.print.use(3.print, 4.print).pass.print
2..8.pass.print
(2..8).pass.print
´echo 4´.pass.print

v08_27_doBlock.jmo



(3.print+4).each
	it.print

{3.print, 9.print, 3.print}.each
	it.print
a=true

[3,5.print,8,9.print].each
	it.print
true.print.use(3.print, 4.print).each
	it.print
2..8.each.echo.pass
	it.print

v08_27_goBlock.jmo

(false.not).pass
	it.print
(3.print+4).pass
	it.print
(true.print).pass
	it.print
{3.print, 9.print, 3.print}.pass
	it.print
a=true
While(a).each.pass
	it.print
	a=false
[3,5.print,8,9.print].pass
	it.print
true.print.use(3.print, 4.print).pass
	it.print
"---".print

2..8.pass
	it.print
(2..8).pass.type.print
(2..8).pass
	it.print
´echo 4´.pass
	it.print

v08_if.jmo

(true).print
(true).pass.print
(true)
	'a'.print
.print

Group(false).get.print
Group(false).pass.print

true.use(1,2).print
true.use(3,4).pass.print

true.use(7,8)
	'a'.print
.print

If(true).print
If(true).then.print
If(true).then.print
If(true)
	'a'.print
.print

varargs_templet.jmo

::test( foo... )
	"-- {} {}".fill(foo.type, foo.toIdent).print
	foo.each.print

############################
Print '='*40

m = Map
m.add( "Foo", 12 )
m.add( "Bar", 23 )
m.add( "Bak", 34 )

this.test( m.values )
this.test( m.values: )
this.test( m.values.toTempLet )

############################
Print '='*40

l = [1,2,3]
this.test( l )
this.test( :l )
this.test( l: )

############################
Print '='*40

S = [9,8,7]s
this.test( S )
this.test( :S )
this.test( S: )

############################
Print '='*40
:S.describe
S:.toDescribe.left(10).print

############################
Print '='*40

T = ||||
1,2
3,4
5,6
||||
this.test( T )
this.test( :T )
this.test( T: )

varconst_nil_type.jmo

Try
	Nil n = nil
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Try
	Nil n3? = nil
	n3?.print
	n3? = 'a'
	n3?.print
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Nil n2? = nil
n2?.print

"---".print

Nil N4? = nil
N4?.print

variable.jmo

a=4
a=4;a.print

a=4
b=a+3
c=1+2+3
a.print
b.print
c.print

d=(5+5)
d.print

f= 2.print+1; f.print   # 2 3

b= 5
b.print
(b+3).print

variablen_2.jmo

a=1
a.print
a=++
a.print
a+=2
a.print

a=5;a+=4;a.print

variable_2.jmo

a=5

a=++
a.print
a=--
a.print
a=**
a.print
a=//
a.print

('-'*30).print

a+=3
a.print
a-=3
a.print
a*=3
a.print
a/=3
a.print
a%=3
a.print

variable_copyvalue.jmo

a=4
b=a
a=5
b.print

a=2; b=1; a=4; c=2+a+b; a=1; a.print; c.print

variations_break.jmo



####################################

Count(5)
	If(it == 3)
		Break
	Echo(it)
Print("-")

5.times
	(it == 3)
		loop.break
	it.echo
"-".print

5.times.breakIs(3).echo
"-".print

{5}.breakIs(3).echo
"-".print

Count(5).each => x
	If(x == 3)
		Break
	Echo(x)
Print("-")

Count(5).each => x
	(x == 3)
		loop.break
	Echo(x)
Print("-")

5.each => b
	(b == 3)
		Break
	it.echo
"-".print

5.each => b
	If(b == 3)
		Break
	b.echo
"-".print

5
	(it == 3)
		Break
	it.echo
"-".print

5
	it.breakIs(3)
	it.echo
"-".print

{5}.echo.is(2).proc(loop.break)
"-".print

{5} => c
	c.echo.equals(2).if.proc(loop.break)
"-".print

###################################

variations_count.jmo



####################################

Count(5)
	Echo(it)
Print("-")

5.times.echo
'-'.print

5.each
	it.echo
"-".print

5.each
	Echo(it)
Print("-")

5
	Echo(it)
Print("-")

5
	it.echo
"-".print

For(1,each<=5,each++)
	it.echo
"-".print

{5}.echo
"-".print

#####

5.times => a
	a.echo
"-".print

5.each => a
	a.echo
"-".print

Count(5).each => d
	d.echo
"-".print

####################################

various_2019-11-05.jmo

::head(Str s)
	s.begin("--- ").append(" ---").print

°head("Variablen")
:a.let(4).print.get.print
a.print.add(3).mem(:a).print
a.print

°head("Range")
(6..9).print

		
°head("Table")
t=Table(2); t.add(4,3); t.add(2,5)
t.each.print
t.each[2].print

°head("Convert")
(33-12).print.toStr.print.charAt(1).print.toBool.print
"abcde".charAt(1).print

°head("Hex")
127.print.toHex.print.parseHex.print
"FF4A".print.parseHex.print
"FF4A".print.parseHex.print

°head("Begin")
"def".append("ghi").begin("abc").print
"def".begin("abc").add("ghi").print

°head("Dec")
"12.34".toDec.print
"12,34".toDec.print

°head("Lists")
[3,1,4,2].min.print
[3,1,4,2].max.print

[3,1,4,2,'5',"6"].min.print
[3,1,4,2,'5',"6"].max.print

[1,2,3,4,5].first.print
[1,2,3,4,5].last.print

[1,3,5].clear.add(7).print

°head("vars")
Object vA? = 5
vA? = 'a'
vA?.print

Object vB? = 6
vB? = 'b'
vB?.print

varlet_alternativen.jmo

5.times.mem(:nr).pass
	nr.print

"-----".print
	
5.times => nr
	nr.print

varlet_auto_wrapping.jmo

l = [1,5,6,7,8,4,3,5,2,9,8,6,4,5]

l.amount( :a, a<8 && a>3 ).print
a.print
"---".print
l.amount( :b, b<8 && b>3 ).print
b.print
"---".print
c = 3
l.amount( :c, c<8 && c>3 ).print
c.print
"----------".print

::foo(VarLet vl)
	vl.get.print
	vl.set(9)

x = 1
°foo(:x)
x.print
"---".print
y = 2

°foo(:y)
y.print
"---".print

°foo(:y)
y.print

varlet_each_multi.jmo

3.times.mem(:a).times.mem(:b).pass
	(a+"+"+b+'='+(a+b)).print

3.times.mem(:a).times.mem(:b).proc(a+b).print

l=[[1,2,3],[4,5,6],[7,8,9]]
l.each.mem(:c).each => d #(:d)
	c.print
	d.print

varlet_exec.jmo

a=5

a.print
(:a).print

b = :a
b.print

b.set(3)
b.print
a.print

(:a).set(6).print
a.print

varlet_functions.jmo

::test(Str s)
	s = ">lazyErrors; \""+s+"\".print; x = 10; °try( :x"+s+" ).catch.info.print; x.print"
	s.jmo

[
".set(20)",
".set(2.0)",
".setLazy( 3/2 )",
".setLazy( 9 )",
".setLazy( '7' )",
".let(20)",
".let(2.0)",
".convertLet( 3/2 )",
".convertLet( 9 )",
".convertLet( '7' )",
".addLet",
".addLet(3)",
".subLet",
".subLet(3)",
".mulLet",
".mulLet(3)",
".divLet",
".divLet(3)",
".modLet",
".modLet(3)",
".andLet",
".andLet(3)",
".orLet",
".orLet(3)",
".xorLet",
".xorLet(3)",
".bitOrLet",
".bitOrLet(3)",
".bitAndLet",
".bitAndLet(3)",
".bitXorLet",
".bitXorLet(3)",
".incLet",
".incLet(3)",
".decLet",
".decLet(3)",
".powLet",
".powLet(3)",
".sqrtLet",

".rootLet",
".rootLet(3)",
".shiftLeftLet",
".shiftLeftLet(3)",
".shiftRightLet",
".shiftRightLet(3)",

].each
	°test(it)

varlet_get.jmo

a = 'a'
b = :a

a.print
b.print

"---".print

b.set('x')
a.print
b.print
b.get.print

"---".print

b.set('z').get.print
a.print

"---".print

::test(VarLet v)
	v.get.print
	v.set('u')

°test(b)
a.print

varlet_handle.jmo

# Create a temporary VarLet

a1 = [4,6,8]
a = :a1
a.toStr.left(10).print
a.get.print

b = [4,6,8].toTempLet
b.toStr.left(10).print
b.get.print

c = 8.toTempLet
c.toStr.left(10).print
c.get.print

d = '6'.toTempLet
d.toStr.left(10).print
d.get.print

e = "abc".toTempLet
e.toStr.left(10).print
e.get.print

"--------------".print

list = [[1,2],[3,4],[5,6],[7,8]]
list.get(4,2).print
list.get([4,2].toTempLet).print

list.set(8, 2, 2)
list.set(9, [2,1].toTempLet)

list.print

varlet_level.jmo

# Bleibt auf dem selben Level, somit wird a weiter benutzt!
# Wirft somit korrekt einen Typ-Fehler

a=4

{1,5}.mem(:a).pass
	a.print

5.times => a
	a.print

5.times => a
	a.print

[4..6].unfold.each => a
	a.print
	
a.print

#####################
('-'*30).print

b='b'

°try

	{1,5}.mem(:b).pass
		b.print
.catch.message.print

°try
	5.times => b
		b.print
.catch.message.print

°try
	[4..6].each => b
		b.print
.catch.message.print

b.print

varlet_level_2.jmo

Count(5, 7).each => y #(:y)
	y.print
	
Try
	y.print
.catch.message.print

"---".print

4.times.mem(:x).print

Try
	x.print
.catch.message.print

"---".print

{5, 7} => z
	z.print
	
Try
	z.print
.catch.message.print

"---".print

a = 9
{5, 7} => a
	a.print
	
a.print

varlet_while_repeat.jmo

b = true

:b.while
	it.echo
	loop.lap.print
	(loop.lap > 5)
		b = false

:b.while
	it.print

"--".print

b = true

:b.repeat
	it.echo
	loop.lap.print
	(loop.lap > 5)
		b = false

:b.repeat
	it.print

"-----".print

b=true
:b.repeat(cur.get)
	it.print
	(loop.lap > 3)
		b = false

"--".print

b=true
:b.while(cur.get)
	it.print
	(loop.lap > 3)
		b = false

"-----".print

b=true
:b.repeat(:x, b == true)
	x.print
	(loop.lap > 3)
		b = false

"--".print

b=true
:b.while(:y, b == true)
	y.print
	(loop.lap > 3)
		b = false

vars_in_counter.jmo

a=5
3.times
	{a,5}
		it.print
		a.print
	a=it

"-----".print

3.times
	{it,5}.print

"-----".print

3.times
	{1,it}.print

vars_in_list.jmo

a=5
3.times
	a=it
	[a].print

3.times
	[it].print

vars_without_qm.jmo

>low

a? = nil
a.print

Object b? = 5
b.print

Object? c = 'a'
c.print

"---".print

D? = nil
D.print

vars_without_qm_2.jmo

::test( i?)
	i.print

°test( 3 )
°test( nil )

"---".print

a? = nil
a.print
a = 2
a.print

"---".print

Char c? = 'a'
c.print

"---".print

ABC? = "ABC"
ABC.print

CBA? = nil
CBA.print

var_access_allowed.jmo

::incAA
	aa.print

::incBB
	bb.print

aa = 1234

Print "-- Direct --".upper
Print aa

Print "-- From root out --".upper
this.incAA

Print "-- From loop out --".upper

2.times
	this.incAA
	#bb = 1234
	#this.incBB	# Fehler, klar

Print "-- From function out --".upper

::test1
	bb = 2345
	#this.incBB	# Fehler, klar

::test2(abc)
	bb = abc
	#this.incBB	# Fehler, klar

this.test1
this.test2(3456)

Print "-- From type out --".upper

::TestType1(Root r)

	bb = 4567
	#r.incBB	# Fehler, klar
	this.run

	::run
		par = 70
		Print bb
		#r.incBB # Fehler, klar

::TestType2(Root r)
	::run
		bb = 5678
		par = 80
		#r.incBB # Fehler, klar
		

TestType1(this)
TestType2(this).run

var_change.jmo

a=5
:a::@varChanged
	("Changed to "+it).print

a=2
a=9
a=++
a.print

var_double_let.jmo

a = 1
b = 2
c = 3

a = ( b = ( c = 9 ))

Print a
Print b
Print c

var_error.jmo

Int? foo = 123
Print foo
foo = nil
Print foo
Print foo.isNil

foo = nil
Print foo
Print foo.isNil

nil.types.print

var_functions_block.jmo

>lazyErrors

Try
	3.times.mem(:a)
		Echo(a,it)
.catch.info.print

3.times.mem(:a).pass
	Echo(a,it)
Print

3.times => b
	Echo(b,it)
Print

Int c = 2
3.times.add(0.1) ~=> c
	Echo(c,it)
Print

Int d = 2
3.times +=> d
	Echo(d,it)
Print

var_inc_dec_let.jmo

a = 2
a.print

"--- A ---------".print

(a = 3).print
a.print

"--- B ---------".print
a = 3

(a + 2).print
a.print
(a += 2).print
a.print

(a - 2).print
a.print
(a -= 2).print
a.print

"--- C ---------".print
a = 3

(a ++ 3).print
a.print
(a ++= 3).print
a.print

(a -- 3).print
a.print
(a --= 3).print
a.print

(a ** 3).print
a.print
(a **= 3).print
a.print

(a // 3).print
a.print
(a //= 3).print
a.print

"--- D ---------".print
a = 3

(a ++).print
a.print
(a =++).print
a.print

(a --).print
a.print
(a =--).print
a.print

(a **).print
a.print
(a =**).print
a.print

(a //).print
a.print
(a =//).print
a.print

var_inc_dec_let2.jmo

a = 100

a -=2
a.print
a -= 2
a.print
a -=-2
a.print
a -= -2
a.print

a --=2
a.print
a --= 2
a.print
a --=-2
a.print
a --= -2
a.print

"-----".print

a = 100

a +=2
a.print
a += 2
a.print
a +=+2
a.print
a += +2
a.print

a ++=2
a.print
a ++= 2
a.print
a ++=+2
a.print
a ++= +2
a.print

var_let.jmo

nr=1
nr.print
4.mem(:nr).print
nr.print

('-'*10).print

3.mem(:nr2)
nr2.print

('-'*10).print

5 => nr3
nr3.print

('-'*10).print

t=1
t.print
2.mem(:t)
t.print
3 => t
t.print

('-'*10).print

max=0
[3,8,7,1,6,9,3].each.passIf(cur>max).print => max
max.echo("Result: ").print

var_let_calc_right_2.jmo

a = 100
[3,7,5,1].each +=> a
a.print

"----------".print

a = 100
[3,7,5,1].each -=> a
a.print

"----------".print

a = 100
[3,7,5,1].each *=> a
a.print

"----------".print

a = 100
[3,7,2,1].each /=> a
a.print

"----------".print

a = 100
[3,7,5].each %=> a
a.print

var_let_calc_right_3.jmo

a = []
[3,7,5,1].each.mul(3) +=> a
a.print

"----------".print

b = ""
[3,7,5,1].each +=> b
b.print

var_let_type.jmo

Print "-----"
Describe x = Describe
Print "-----"
Describe x
Print "-----"

var_mem_let.jmo

a=3
b=5

4.print => c
7 => a

5.mem(:d)
d.print
8.mem(:b).print
b.print
:e.set(1).get.print
e.print
:f.let(a).get.print
[a,b,c,d,e,f].print

var_modifiers_2.jmo

Object a? = 3
a?.print
a='a'
a.print
a? = 2.3
a?.print
a? = nil
a?.print

"----------".print

b? = 2
b?.print
b = nil
b.print

°try( b = 3.4 ).info.print

"----------".print

c = 2
c.print
°try( c = nil ).info.print

var_modifiers_3.jmo

>high

it.print

5.pass
	it.print

"-----".print

Object b? = 9
b?.print
b? ~= 3/2
b?.print

var_multi_let.jmo

x=a=5;x.print;a.print
"---".print
x=(a=5.mem(:d)+(b=2)+3=>c); x.print; a.print; b.print; c.print; d.print

var_name.jmo

par_video = "-vcodec libx264 -crf 18"
par_video.print

var_types_memlet.jmo

ConstLet cl = 123:
cl.tee(cur.toStr.left(8).print).type.print
cl.get.print.type.print
Print

MemLet ml = 123:
ml.tee(cur.toStr.left(8).print).type.print
ml.get.print.type.print
Print

a = 4
VarLet vl = :a
vl.print.type.print
vl.get.print.type.print
Print

B = 5
ConstLet l2 = :B
l2.print.type.print
l2.get.print.type.print
Print

FuncLet fl = :{"abc".length}
fl.print.type.print
fl.exec.print.type.print
Print

var_type_nil.jmo

>lazyErrors

Int? i1 = 123
Int i2? = 456
Print i1? + " " + i2?
i1 = nil
i2 = nil
Print "{} {}".fill(i1?, i2?)

Print "--------------"

Str? s = "abc"
s.print
s = nil
s.print

Print "--------------"

Bool? b? = true
Print b
b = nil
Print b

Print "--------------"

Bool bb? = false
Print bb
bb = nil
Print bb

Print "--------------"

Java_{de.mn77.base.data.group.Group2}? g = nil
Print g

var_upper_blocklevel.jmo

::MyTest
	r=5

	::get
		r.print

MyTest.get

MyTest.get.print

a=MyTest
a.get.print

var_with_type.jmo

Int i = 5
i.print
i = 1234
i.print
i.type.print

"---".print

Object o = 'a'
o.type.print
o.print
o = 2
o.type.print
o.print

"---".print

Try
	Int j = 'a'
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Try
	Hugo h = "hugo"
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

Try
	Fred f? = nil
	f?.print
.catch.proc(:p, p.message+" / "+p.detail).print

"---".print

::Gustav

Gustav g? = nil
g?.print
g? = Gustav
g?.print

var_with_type_2.jmo

b = true!

::test(Bool bb)
	Int a = bb.use('a', 3)
	a.print

Try
	°test(true)
.catch.detail.print
Try
	°test(false)
.catch.detail.print

var_with_type_2b.jmo

b = true!

::test(Bool b)
	Int a = b.use('a', 3)
	a.print

Try
	°test(true)
.catch.detail.print
Try
	°test(false)
.catch.detail.print

warnings_2.jmo

>noWarnings

app::@warning
	Print "*** Warning ***"
	Print it.info
	Print "***************"

Print 5/0
Print "---"
Warning("Foo","Bar").throw
Print "---"

which.jmo

['A','D','G','Y','P','T', 't','$','4'].each => item
	type = 5
	( item <= "F" )
		type = 1
	.else( item <= "L" )
		type = 2
	.else( item <= "R" )
		type = 3
	.else( item <= "X" )
		type = 4

	type.echo
	", ".echo

	#############################

	type2 = item.which( cur <= "F", cur <= "L", cur <= "R", cur <= "X", true )
	type2.echo
	", ".echo

	type3? = item.which( cur <= "F", cur <= "L", cur <= "R", cur <= "X")
	type3.print

"----------".print

5.which( cur==1, cur==5, cur==9).print
3.which().print

"----------".print
9.times.echo.which( cur<5, cur==5, cur>5 ).print

which_2.jmo

['A','D','G','Y','P','T', 't','$','4'].each => item
	item.echo
	": ".echo

	type2 = Which( item <= "F", item <= "L", item <= "R", item <= "X", true ).get
	type2.echo
	", ".echo

	Which( it <= "F", it <= "L", it <= "R", it <= "X")
		it.print

"------------------------".print

[1,2,3,4,5].each => item2
	Which( item2 < 2, item2 < 4, item2 == 4, item2 > 4 )
		("First true argument: " + it).print

while_cur.jmo

b = true
While(cur.print.proc( b )).proc(b = false).print

Repeat(cur.print.proc( false )).print

while_loop.jmo

d=true
While(d)
	d.print
	d=false
	

b=true
c=1
While(b).each
	it.echo
	If(c>=9).then
		b=false
	c.print
	c=c+1

while_repeat.jmo

############################
# So in Programmier-Stile
	
b = true
:b.while
	"{} - {}".fill(it,b).print
	b = false

"---".print

b = true
:b.while
	"{} - {}".fill(it,b).print
	it.set(false)

"---".print

b = false
:b.repeat
	"{} - {}".fill(it,b).print

"----------".print
############################
# Klassisch

i = 5
While( i < 9 )
	"{} - {}".fill(it,i).print
	i += 2

"---".print

i = 5
Repeat( i < 9 )
	"{} - {}".fill(it,i).print
	i += 2

"----------".print
############################
# So im Wiki, geht aber natürlich nicht:
# () = Group().get

# Aber SO geht:

i = 3
( i < 7 ).while(i < 7)
	"{} - {}".fill(it,i).print
	i += 2

"---".print

i = 3
( i < 7 ).repeat(i < 7)
	"{} - {}".fill(it,i).print
	i += 2

"----------".print
############################
# Oder so:

4.while( each < 8 )
	"{} - {}".fill(it).print
	it += 2
	
"---".print

4.repeat( each < 8 )
	"{} - {}".fill(it).print
	it += 2

wiki77.jmo

""""
= Headline
This is a Text

A new paragraph

Erzwungener\\\\Zeilenumbruch

List:
* Item 1
* Item 2
* Item 3

# One
# Two
# Three

---
End
"""" => text1

""""
= Überschrift 1. Ebene =
== Überschrift 2. Ebene ==
== schließende Gleichheitszeichen sind in allen Ebenen optional
=== Überschrift 3. Ebene ===
==== Überschrift 4. Ebene
===== Überschrift 5. Ebene =====
===== schließende Gleichheitszeichen sind in allen Ebenen optional
---------
def
* A1
* A2
** B1
** B2
* A3
** B1
*** C1
** B2
* A4
abc
-----
def
# A1
# A2
## B1
## B2
# A3
## B1
### C1
## B2
# A4
abc
-
--
---
----
-----
def
  Code
  Another Code
  	Tabbed Code
xyz
|=table|=header|=line 1|=|
|a|table|row|xy|
|b|table|row|xy|
| c| table |row |xy|
| **d** | //table//|__row__ |**//__xy**//__|
|||||
hjk
**Lorem** //ipsum// \\\\dolor **__//sit// amet__, consetetur** sadipscing elitr.
Lorem [[http://www.ipsum.com]] dolor
Lorem [[http://www.ipsum.com|Ipsum]] dolor
{{schnee.jpg}}
{{19.jpg|Bild}}
Lorem ** // foo --test-- now --

This is the first line,\\\\and this is the second.

Bold and italics should //be
able// to cross lines.

But, should //not be...

...able// to cross paragraphs.
"""" => text2

Wiki77.parse(text1).print
(70*'=').print
Wiki77.parse(text2).print

wiki77_line.jmo


Wiki77.parse( "-----" ).print

xml_1.jmo

data = """"
eJzNmlFP2zAQx9/7KVDfSX1n39mWQhCCIkUbKeu6ib6WoQmJQTWkqR9/DmWowuepalCcp7qJVH46
n///uzPl6ebXw9Gfu9/P90+PJ2Mo1Pjo7vH26cf948+T8bfF5bEbn1ajsm6+T5vFbL5s14vp1evH
Ynk9ra7Lydt6+7i+qAhx+zisR+X57PNsXjlVTrarUXl1dnM9r8+nFRbMHF68PQjv6ubLYllBeLhd
tT/QXNSLetZUN+1v/PsyKufTq7P5p6+TsGxmi/pyWTXl5HU12hLsi8wAzq9XiiNwELhV4RzqIXBr
Rl6tnynC9nK8LZlBxBsAwYZ4w17xpsIrPQhugwpjZufEJAk5NQhor5FiaGvlzCbvD4bunM5KW7Pe
xLCIJOuHNr3Q1hItgsHjXdadMDIx9Lz3IqMFNjIjFGjUIBjJs0oyoqKBMP5nr+3hSfixjDoVR+Vh
EIwGlEoGEn1bOeSHdMpTKpCsYBDOD6Raj3/vnnK5oo09/KR39kzHcX0iWiYUmrTNBxq2PQZlAVQX
lv3hqdoZlJyPt15yyLD1uoPId996svvmKDjOV3iggRiU5bIOvT/ckrqCOkvsQuGMD3GmygngnMmX
qW1/crteAXCsVWKLAoXFDk7VlTeIqqcQXiFrxfrTGZdPr8Q+W9bV4Kz5groBivvqll0AVZRTVy06
AVRyAFWQa1/kOldaCbMKWQA8dqhYOodUvxTH7w+Tks5+kFZn8qGGkEq2CjIqk8nnAkhsYj1N6L/S
ZlASJfo/FOalx485sQ9Or4lb3d+TVhfKGTGqvdCG08/CjEROVJ0oV3oh3QDEISW5AGTj8p0oEbQt
RCTlt3K/30tELRLEXQpJbhpITU491YAxKcoxNUgZVQqAdkl3CrzQE+YchwLpeHBrEjqvspZ4ezsn
hGYrI2h8zMWAmiCcyuWchAv1neTw7RyXDr9n+IhKNK6arCzxBnROiTeWpcsFI8N6lXEWtb3YWynt
4nxNNM7ELm+j3/ISx4KV4EXrezlf8r0IgXapObTWWcmUTU/IrclIFppzn4yZ414MPLmbiSuk4DcW
ejnHqTsZSG9mPxOEFNi7i8GP+eOTnX8X+Qs34wD0
eJzNmlFP2zAQx9/7KVDfSX1n39mWQhCCIkUbKeu6ib6WoQmJQTWkqR9/DmWowuepalCcp7qJVH46
n///uzPl6ebXw9Gfu9/P90+PJ2Mo1Pjo7vH26cf948+T8bfF5bEbn1ajsm6+T5vFbL5s14vp1evH
Ynk9ra7Lydt6+7i+qAhx+zisR+X57PNsXjlVTrarUXl1dnM9r8+nFRbMHF68PQjv6ubLYllBeLhd
tT/QXNSLetZUN+1v/PsyKufTq7P5p6+TsGxmi/pyWTXl5HU12hLsi8wAzq9XiiNwELhV4RzqIXBr
Rl6tnynC9nK8LZlBxBsAwYZ4w17xpsIrPQhugwpjZufEJAk5NQhor5FiaGvlzCbvD4bunM5KW7Pe
xLCIJOuHNr3Q1hItgsHjXdadMDIx9Lz3IqMFNjIjFGjUIBjJs0oyoqKBMP5nr+3hSfixjDoVR+Vh
EIwGlEoGEn1bOeSHdMpTKpCsYBDOD6Raj3/vnnK5oo09/KR39kzHcX0iWiYUmrTNBxq2PQZlAVQX
lv3hqdoZlJyPt15yyLD1uoPId996svvmKDjOV3iggRiU5bIOvT/ckrqCOkvsQuGMD3GmygngnMmX
qW1/crteAXCsVWKLAoXFDk7VlTeIqqcQXiFrxfrTGZdPr8Q+W9bV4Kz5groBivvqll0AVZRTVy06
AVRyAFWQa1/kOldaCbMKWQA8dqhYOodUvxTH7w+Tks5+kFZn8qGGkEq2CjIqk8nnAkhsYj1N6L/S
ZlASJfo/FOalx485sQ9Or4lb3d+TVhfKGTGqvdCG08/CjEROVJ0oV3oh3QDEISW5AGTj8p0oEbQt
RCTlt3K/30tELRLEXQpJbhpITU491YAxKcoxNUgZVQqAdkl3CrzQE+YchwLpeHBrEjqvspZ4ezsn
hGYrI2h8zMWAmiCcyuWchAv1neTw7RyXDr9n+IhKNK6arCzxBnROiTeWpcsFI8N6lXEWtb3YWynt
4nxNNM7ELm+j3/ISx4KV4EXrezlf8r0IgXapObTWWcmUTU/IrclIFppzn4yZ414MPLmbiSuk4DcW
ejnHqTsZSG9mPxOEFNi7i8GP+eOTnX8X+Qs34wD0""""

source = ZLib.decompress( Base64.decode(data) ).arrange

xml = Xml
xml.print
doc = xml.parse( source )

doc.strTable( ["INVENTORY", "ITEM"], [ ["ITEMTYPE"], "ITEMID", ["COLOR"] ]).print
('-'*79).print
doc.strTable( ["INVENTORY"], [ ["ITEM","ITEMTYPE"], ["ITEM","ITEMID"], ["ITEM","COLOR"] ]).print
('-'*79).print
doc.strTable( ["INVENTORY", "ITEM"], [ "ITEMTYPE", "ITEMID", "COLOR", "MINQTY", "CONDITION", "" ]).print
('-'*79).print
doc.strTable( ["INVENTORY", "ITEM"], [ "MINQTY" ]).column(1).print.type.print

zlib_base64.jmo

data1 = """"
eJzNmlFP2zAQx9/7KVDfSX1n39mWQhCCIkUbKeu6ib6WoQmJQTWkqR9/DmWowuepalCcp7qJVH46
n///uzPl6ebXw9Gfu9/P90+PJ2Mo1Pjo7vH26cf948+T8bfF5bEbn1ajsm6+T5vFbL5s14vp1evH
Ynk9ra7Lydt6+7i+qAhx+zisR+X57PNsXjlVTrarUXl1dnM9r8+nFRbMHF68PQjv6ubLYllBeLhd
tT/QXNSLetZUN+1v/PsyKufTq7P5p6+TsGxmi/pyWTXl5HU12hLsi8wAzq9XiiNwELhV4RzqIXBr
Rl6tnynC9nK8LZlBxBsAwYZ4w17xpsIrPQhugwpjZufEJAk5NQhor5FiaGvlzCbvD4bunM5KW7Pe
xLCIJOuHNr3Q1hItgsHjXdadMDIx9Lz3IqMFNjIjFGjUIBjJs0oyoqKBMP5nr+3hSfixjDoVR+Vh
EIwGlEoGEn1bOeSHdMpTKpCsYBDOD6Raj3/vnnK5oo09/KR39kzHcX0iWiYUmrTNBxq2PQZlAVQX
lv3hqdoZlJyPt15yyLD1uoPId996svvmKDjOV3iggRiU5bIOvT/ckrqCOkvsQuGMD3GmygngnMmX
qW1/crteAXCsVWKLAoXFDk7VlTeIqqcQXiFrxfrTGZdPr8Q+W9bV4Kz5groBivvqll0AVZRTVy06
AVRyAFWQa1/kOldaCbMKWQA8dqhYOodUvxTH7w+Tks5+kFZn8qGGkEq2CjIqk8nnAkhsYj1N6L/S
ZlASJfo/FOalx485sQ9Or4lb3d+TVhfKGTGqvdCG08/CjEROVJ0oV3oh3QDEISW5AGTj8p0oEbQt
RCTlt3K/30tELRLEXQpJbhpITU491YAxKcoxNUgZVQqAdkl3CrzQE+YchwLpeHBrEjqvspZ4ezsn
hGYrI2h8zMWAmiCcyuWchAv1neTw7RyXDr9n+IhKNK6arCzxBnROiTeWpcsFI8N6lXEWtb3YWynt
4nxNNM7ELm+j3/ISx4KV4EXrezlf8r0IgXapObTWWcmUTU/IrclIFppzn4yZ414MPLmbiSuk4DcW
ejnHqTsZSG9mPxOEFNi7i8GP+eOTnX8X+Qs34wD0"""".trim

ba = ZLib.decompress( Base64.decode(data1) )
ba.arrange.print
Print 79*'-'

data2 = Base64.encode( ZLib.compress( ba ) )

(Base64.decode(data1) == Base64.decode(data2)).print

Print 79*'-'
data1.print
Print 79*'-'
data2.print
Print 79*'-'

 

 

Unterstützen

Die Entwicklung von "JayMo" wird derzeit nur durch Eigeninitiative ermöglicht.

Erhalten:  0 €