JayMo 0.22 - 28.03.2023

Direct Str to File

"abcdef".fileSet( "/tmp/test.txt" )
"ghijkl".fileAdd( "/tmp/test.txt" )

Limit string length

"abcdef".limit( 5 ).print
"abcdef".limit( 3, '…' ).print

Functional Table

table.filter( each[1].contains("foo") ).describe
table.amount( each[2].startsWith('E') ).describe
table.reduce( 0, :a, a[1] + a[2] ).describe
table.map( :a, a[1] = a[1].upper ).describe
table.map( :b, [ b[1].capital, b[2].lower, b[3].left(3)] ).describe

Navigate through directorys

Dir( "/tmp" ).dirMake( "foo" ).dirMake( "test" ).file( "bar.txt" )

Table style

New char for table row:

n = Empty line

Whitespace = no (row/column) line

table.style( "b:: n-=" ).print

JayMo 0.21 - 23.12.2022

Shortcuts removed

$, $$, %, €

Format/Style

L=Left, C=Center, R=Right

"{3L} {3C} {3R}".fill(1,2,3).print

New specifics for String (s): I,D I = Ident, D = Describe

123.format( "s:D" ).print

Table style

Styling a table

table.style("b!").print

Format is: "Table:Columns:Rows" Chars for Table:

I = Convert objects with .toIdent
D = Convert objects with .toDescribe
u = use unicode lines
b = border
L, < = Default align left
C, ^ = Default align center
R, > = Default align right
| = Default column line "|"
! = Default column line " | "
1 = Default column line " "
2 = Default column line "  "
- = Default row line ""
+ = Default row line ""

Chars for Columns:

L, < = Align left
C, ^ = Align center
R, > = Align right
_ = Use default align
| = Column line "|"
! = Column line " | "
1 = Column line " "
2 = Column line "  "
. = Use default column line

Chars for Rows:

- = Default row line ""
+ = Default row line ""
* = Use default row line

Now, every Object can be formated.

Random.format("|{}|")

New atomic type: Dec

"Dec" is a atomic decimal number with max. 9 decimals.

123.456
234.567c

It has no fractals! If you want:

1.0 / 3 * 3

which results in "0.999999999" so append "d" for type "Double":

1d / 3 * 3

Output to Log-File

app.setLogFile( "/tmp/jaymo-test.log" )

PrintLog( "foo" )
"bak".printLog
PrintErr( "xyz" )
"uvw".printErr

Read environment

Sys.envMap
Sys.env( "HOME" )

New String functions

"abcdba".only( 'b','a' ).print
"abcdba".unique.print
"abccca".unite.print
"abc def ghi".words.print

Templet

Using a TempLet with VarArgs:

items = [2,4,6]
[1].add( items )
[1].add( items: )
[1].add( items.toTempLet )

Sync & Async

New control types: Sync, Async

Async
	100.times.print
Print "Foo"

Type definition now also with ':'

::Foo : Object

Object to string

Print 123
Ident 123
Describe 123
123.print
123.ident
123.describe

Runtime warnings

When a situation can safely handled, only a warning will be thrown.

Print 5/0

Warning can be turned off with:

>noWarnings

Quick-Help system

Search type:

?Obj
?Obj*
?*ect

Search function

?Object.
?Object.pr
?Object.pr*
?Object.*int

Negative / Not

Negative value:

123.neg

Bitwise NOT:

123.botNot

Proc, Tee, List.store now also with Constant

123.proc( :X, 3 * X )

Definition of a FuncLet changed from '::' to ':{ }'

myFuncLet = :{ "123".add }
myFuncLet.exec( "456" ).print

String-Get/Set changed from ':' to '$'

row$item$name.print

Arrange ByteArray with Charset

[72,97,108,108,111]b.arrange(Charset.CP1252).print

New List-Modifier

list = [1,2,3]
list = [1,2,3]l
set = [1,2,3]s
byteArray = [1,2,3]b

Modifiers for Cmd

o=output, e=error, b=buffer, r=result, l=live

´echo 123´o.add( "456" ).print

String-Modifiers

l=Literal, r=RegEx

"\n".describe
"\n"l.describe
"^[0-9]$"r.describe

Variable-Modifer ?? and ¿ removed

Now use a specific type:

Object obj? = nil
obj = 123
obj = "xyz"

String cut functions

Functions: before, till, from, after Every function can be used plain (which is an alias to "First") or with "First" or "Last".

"abcba".before('b').print
"abcba".tillFirst('b').print
"abcba".fromLast('b').print
"abcba".afterFirst('b').print

JayMo 0.20 - 22.07.2022

Variables/Constants only for a Block, if available

5.times => a
	Print a
3.times => BB
	Print BB

Number style

Fix dot with , or .
Optional dot with ; or :
Group thousands with _ or *

Print 12345.style("?*???*??0;??")
Print 12345.67.style("?*???*??0;??")

Trim string

s = "  abc  "
Print( '|' + s.trim + '|' )
Print( '|' + s.trimLeft + '|' )
Print( '|' + s.trimRight + '|' )

As-Functions for List

Atomic type conversion for every item.

list = [2i, 3s, 4.5, true, '9', "123"]
list.ident
list.asStr.ident

New detach-functions to use a list as FIFO or LIFO

cache = []
cache.add 5
cache.add 9
cache.add 2
cache.add 7

While( cache.hasNext )
	cache.detachFirst.print

Tableblock at blocklevel and with comments

2.times
	||||
	1,2
	# 3,4
	7,8
	|||| => t
	
	t.print

Format-String changed

Now a doublepoint is needed between cell definition and special formats.

Print "{10^s:u}".fill("abc")

Format-String specials for Str

t = trim
e = escape backslash and EOF
E = escape all special chars
r = remove all escapes
h = Specialchars to HTML-Entitys
H = All possible chars to HTML-Entitys
d = HTML-Entitys to normal chars
c = capitalize first word
C = capitalize all words
u = upper case
l = lower case
1,2,3,4 = quote with ' or " and escape or doubling

Print "{s:tc1}".fill(" abc ")

JayMo 0.19 - 04.04.2022

New big atomic types

BigInt

1234a

BigDec

123.456z

Modifier for definition of type/func with control ability changed

::MyPrint(args...)!!
	this._init
	args.each.print

3 different ways to convert Object to String

Classic output:

Print 123
Ident 123
Describe 123

Output with function:

123.print
123.ident
123.describe

Convert directly:

123.toStr
123.toIdent
123.toDescribe

Override default:

::Foo
	::toStr = "abc"
	::toIdent = "def"
	::toDescribe = "ghi"

New classic type: Sleep

Milliseconds

Sleep(100)

Seconds, Milliseconds

Sleep(2,0)

Minutes, Seconds, Milliseconds

Sleep(1,30,500)

Accessing JayMo

Magic variables:

jaymo
jmo

Execute a string:

"123.print".jmo.print
"456.print".jaymo.print

Access to functions in parent type

::Foo
	::test
		Print "Foo"

::Bar
	super.test

Self defined magic constants

::__MY_MAGIC = 123

Execute default function and assign block value to a variable

This is useful, because "it" is valid for only one level.

Count(3) \\ abc
	Print abc
['a', 'b', 'c'] \\ x
	Print x

Alternative way with assigning to the right:

['a', 'b', 'c'].each => x
	x.print

\\ is allowed like => without VarLet/ConstLet up to ">medium"

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

Dimensions of atomic types

0b.MIN_VALUE.describe
0d.MAX_VALUE.describe
"".MIN_VALUE.describe
nil.MIN_VALUE.describe
true.MIN_VALUE.describe

Auto-Upgrade (available at parser-level: open/low)

Long l = 5b
l.describe

Complex arguments for parent type

::Foo( Int i, Int j )
	i.print
	j.print

::Bar( x ) ^ Foo( x.add(1), x*2 )

Bar( 5 )

Complex default values

For functions:

::test( Int round = 3*4, List items = [].init(5, nil) )

For types:

::Foo( Int a = 3*4, Str b = 5*'+', l = [].init(7,false).add(3), c = Count(5) )

Splitting strings

S = "abcdef"

Print S.explode
Print S.split
Print S.split( "[cd]"?? )
Print S.split( "de" )
Print S.split( 2 )		# every 2 chars
Print S.split( 3 )		# every 3 chars

Print S / 1
Print S / 2		# 2 pieces
Print S / 3		# 3 pieces
Print S.div(4)

Time and DateTime now with milliseconds

t1 = Time( 12,34,56,789 )
t1 += 1.5
Ident t1

Self defined constants

::Foo
	::AA = 12345
	::BB( 'b' )

Foo.AA.print
Foo.BB.print

Stream for event handlers

::@event

this::@event => foo
	foo.print

this::@event.echo("-> ").print

this.@event( 123 )

Make a List read only

[ 2,5,8 ].freeze

Counting map

map = [7,8,2,4,7,5,4,0,2,4,7,5,3,8,6,0,9,7,1,4].toUniqueMap

Increase / decrease

map.inc( 3 )
map.dec( 7 )

Add or increase

map.count( 'a' )

Self defined magic constant

::__ABC = "Abc"

__ABC.print

Using .mem with a constant/constlet

3.mem(:Y).print
Y.print

Import Java classes

>class "java.net.URI"

Java_URI( "file:///tmp/foo.tmp" ).print

Short version and instantiation with the type "Java":

>? java.net.URI

Java( "java.net.URI", ["file:///tmp/foo.tmp"] ).print

Passing a single argument for a parser switch

>prefix( "Foo" )
>prefix "Foo"
>prefix = "Foo"

New Parser switches

>noJava
>sandbox

Table with titles and init values

tab = Table( 3, 4, 'x' )
tab.setTitles( "a","b","c" )
tab.describe
tab = Table(3)
tab.init( 2, 'a' )
tab.init( 2, 'b' )
tab.init( 2, 'c' )
tab.describe

Independent execution of Block and Stream

result = func.pushBlock(123)
result = func.pushStream(result)
result.print

The ".try"-Function

a = 1.try
	it / 0
.print.catch.info.print
b = 1.try.div(0).print
c = 1.try( $.div(0) ).print

The ".tryUse"-Function

a = 2.tryUse( "Foo" ).div(0).print
a.print
b = 3.tryUse( "Foo" )
	3.div(0).print
b.print

Run other JayMo-Files

jaymo.run( "/home/foo/bar.jmo" )
jaymo.run( "/home/foo/bar.jmo", [123,456,789,'a',"foo"] )

Include relative or absolute

Absolute:

>include "/foo/bar.jmo"

Relative:

>include "foo.jmo"
>include "foo/bar.jmo"

Short version:

>> "foo.jmo"

New escape char

\0

JayMo 0.18 - 21.11.2021

Type-Constants

::MyColors
	::RED( 0xff0000 )
	::GREEN = 0x00ff00

Print MyColors.GREEN

Enums

::MyEnums
	::FOO
	::BAR_BAK

got = MyEnums.FOO

If( got == MyEnums.FOO )
	Print got.getOrdinal

ParserSwitches for Java imports

>class java.net.URI
>package java.net

Shortcuts:

>? java.net.URI
>* java.net

Shortcut for JayMo-Import

>> other.jmo

Atomic auto upgrade

Long l = 123
l = 45b
Describe l
DecNumber d = 123
Describe d
e = 12.345
e = 89
Describe e
s = "foo"
s = 123
Describe s

Sleep

"Sys.sleep" now becomes

this._sleep

Catch all

app::@error
	Print "Oh no, there's an error!"
	Print it.info

Object to string

Now there are 3 stages:

.toStr
.toIdent
.toDescribe

New magic variables

infinity
+infinity
-infinity
not_a_number

Object compare

Returns: -1 (lesser), 0 (equal), 1 (greater)

123.compare( 321 ).print

Access to Java-Classes

myList = Java_{java.util.ArrayList}
myList.toString.print

New format type: t = Type

format = "|{10t}|"
format.fill( 123 ).print
format.fill( 'x' ).print

Open argument for parser-switch

Normal way:

>setOutputFile( "out.txt" )

Open argument:

>setOutputFile "out.txt"

Deprecated and removed:

#>setOutputFile = "out.txt"

Pipe to shell command

123.´echo´.describe
123.´echo´?.describe
123.´echo´??.describe
123.´("echo")´??.describe
123.pipeToCmd( "echo" ).describe

Fix list and map

Prevent changeing size or the type of an item

list = [ 12, 34, 56 ].fix
map = Map( 'a'-> 12, 'b'-> 34, 'c'-> 56 ).fix

List mathematics

Creating a copy

l = [1,2,3,4]
Print l + 7
Print l - 2
Print l * 3
Print l / 2
Print l ++ [8,9]
Print l -- [1,3]

Modify the list

l = [1,2,3,4]
l += 7
l -= 2
l *= 3
l /= 2
l ++= [8,9]
l --= [1,3]

Open argument for functions (with some restrictions)

Foo.setTitle "New title"
this.print 123

JayMo 0.17 - 25.07.2021

Important changes:

New License = LGPLv3

Old New
getSize
getLength
loop.nr
loop.lap
Number.format
Number.style
>import
>include
_MAGIC_CONST
__MAGIC_CONST
funclet = :5.add
funclet = ::5.add
::controlFunc{ Int a }
::controlFunc( Int a )?
al = ArrayList
al = Java_ArrayList
Date.format
Date.style

Removed

  • Switch
  • Seek
  • Object.do
  • §<<
  • &||
  • &>>
  • <file.txt>
  • <[files*.*]>

Sys-commands reorganized

Live:

´echo 4´

Pipe:

´echo 4´?.print

Buffer:

´echo 4´??.output.print

New classic Types

Print

Print "Hello!"

Echo

Echo "This "
Echo "is "
Print "a test!"

Next, Break

Count( 5 )
	If( it == 2 )
		Next
	If( it == 4 )
		Break

Return

::foo
	Return "FOO"

Set

mySet = Set(2,5,7,9)
mySet = [2,5,7,9]?

Each

list = [ 2,4,6,7,8 ]
Each( list )
	Print it

Loop

counter = 0

Loop
	counter=++
	If( counter > 10 )
		Break
	Print counter

Which

a = 4
Which( a < 3, a == 3, a == 4, a > 4 )
	Print it

PrintErr, EchoErr

PrintErr "foo"
"foo".printErr
EchoErr "foo"
"foo".echoErr

Writing of numbers

With underline:

123_456
0x89_AB_CD_EF

With exponent 'E'

123E3
123e+3
123E-3
12.3E3

New magic constant

Arguments of the application:

__ARGS

This is equal to:

app.getArgs

Assert

a = 5
a.assertIs( 5 )
a.assertIf( cur < 9 )

Atomic-Format

[ 1, 23, 456 ].each.format( "Number: {3>}" ).print

String modifiers

string  = "Foo\tBar"
literal = "Foo\tBar"?
regex1  = "Foo\tBar"??
regex2  = "Foo\tBar"¿

Table titles

tab = Table( 2 )
tab.setTitles( ["Foo", "Bar"] )
tab.getTitles

ConstLet

X = 123
cl = :X
cl.get.print

Alternative function names

::myFunc|myFunction( Int a, Int b ) = a+b

this.myFunc( 2, 3 ).print
this.myFunction( 2, 3 ).print

Null

'null' is a alias for 'nil'

nil.print
null.print

Mathematic assign to the right

5 => a
3 +=> a
1 -=> a
2 *=> a
2 /=> a
3 %=> a

Shutdown hook

app::@exit
	"This is the end!"

Event handler definition

Consts are allowed, vars must be declared

a = 2  
b = 4
C = 6

:a::@varChanged( b )
	C.print
	b.print

a = 9

Parser switch arguments

>include( "foo.jmo" )
>include = "foo.jmo"

"Namespace" becomes "Prefix"

>prefix = "Foo"

::Foo_Test

_Test
Foo_Test

"Select" with placeholder

l = [ 4,7,9,1,6,5,2 ]
l.select( 3,5,2,nil,6 ).print

Type definition

New format:

::MyType( <pars> ) ^ BaseType( <pars> ) = defaultFunc

Quick VarLet

b = [4,6,8].toVarLet

Select / Select lazy

l = Range('a', 'f').toList

l.select(3,2,6).print
l{3,2,6}.print

l.selectLazy(3,9,6,7).print
l{3,9,6,7}?.print

Update

l = Range('a', 'f').toList

l.update('x', 3, 2, 6).print

l{3,2,6} = 'x'
l.print

l.updateLazy('y', 3, 9, 6, 7).print

l{3,9,6,7}? = 'x'
l.print

Tree-Block

>>>>
	html
		body
			p,
			a
				font-size = "16px"
				font-family : "16px"
<<<<.show

Lazy Tree-Block

>>>>
	html
		body
			p,
			a
				font-size = 16px
				font-family : 16px
<<<<?.show

Table-Block

t = ||||
"foo",'a',6
"abc",'b',7
"def",'c',8
||||

t.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

JayMo 0.16 - 06.12.2020

Magic Variables

Some magic constants become magic variables.

E.g.: _THIS > this

this
it
loop
func
app
jmo
cur
each
nil
true
false

Sleep moved

Old:

_THIS.sleep

New:

Sys.sleep

Bit operations

123.bitAnd
123.bitOr
123.bitXor

Is not Nil

a = "foo"
If( foo.isNotNil )
	Print a

Normalize Dec

Decimal numbers will be normalizend to prevent fractals.

This can be turned off with:

>openDec

Next / Break

Count( 5 )
	If( it == 2 )
		Next
	.else( it == 4 )
		Break
	it.print

Auto-VarLet

"abcdef".amount( :b, 'd' > b ).print
"abcdef".amount( a, 'd' > a ).print
"abcdef".mem(c); c.print
"abcdef".mem(:d); d.print
::test(VarLet e)
	e.get.print

f = 1
°test(f)
g = 2
°test(:g)

Final result

Terminate the application with:

app = 0

Terminate a loop with:

loop = 0

Nil-Use

123.nilUse(11,22).print
nil.nilUse(11,22).print

Type-Use

123.typeUse("Int",1,2).print

New option for "jmo"

Direct execution:

jmo -e "Print 123"
jmo --exec "Print 123"

JayMo 0.15 - 26.10.2020

Tree-Block

tree = >>>>
	body
		font-size: 16px
		margin: 20px
		line-height: 1.5
	b, strong
		font-weight: bold
<<<<

tree.show

Tree

t = Tree
t.add("Foo")
t.add("Bar")
t.show
t.get("Foo").add("Boo")
t.get("Bar").pull("Xar").pull("Tar")
t.show
t["Foo","Too","Zoo"]?
t["Bar","Xar","Tar"] = "War"

Auto-Propertys

For propertys, "Get" can be left out:

::getValueX = "myValue"

_THIS.getValueX.print
_THIS.valueX.print

For "Set" a '=' must be added:

::setValueX(x)
	x.toStr.print
_THIS.setValueX(9)
_THIS.valueX = 9

Cutting Strings

Some methods are changed

s = "abcabc"
Starting from position
s.start(3)
cabc
End at position
s.end(3)
# abc
From (first) sequence
s.from("c")
cabc
From first sequence
s.fromFirst("c")
cabc
From last sequence
s.fromLast("c")
c
After (first) sequence
s.after("c")
abc
After first sequence
s.afterFirst("c")
abc
After last sequence
s.afterLast("c")
 
Before (first) sequence
s.before("c")
ab
Before first sequence
s.beforeFirst("c")
ab
Before last sequence
s.beforeLast("c")
abcab
To (first) sequence
s.to("c")
abc
To first sequence
s.tillFirst("c")
abc
To last sequence
s.tillLast("c")
abcabc
Begin string with
s.begin("c")
cabcabc
Append to string
s.append("c")
abcabcc

Create a temporary VarLet as handle vor VarArgs

Object.handle now creates a temporary VarLet to the current object

h = 8.handle
h.get.print

Shortcuts for _EACH

As shortcut for _EACH you can use € and £

l = [4,9,8,2,7,3,6,5]
l.map( $$++ ).print
l.map( €++ ).print

Overwrite .toStr

::toStr = "My own string!"

°print
_THIS.print

Hot execution

Execute a String at runtime

a = 11

# Runs in container
_JMO.exec("a = 22; a.print")
a.print

# This also
"a = 33; a.print".jmo
a.print

Execution with full access to the environment.

>unsafeHotCode

# With full access to variables
_APP.exec("a = 44; a.print")
a.print

Order of arguments for .set and .put changed!

New order: Object, position1, position2, position3, ...

So its clearer: Put/Set that Object there! And it's possible to use a List (VarLet-Handle) for VarArgs

t = Table(2).add(1,2).add(3,4)
t.set(9, 2, 1)
t.put(8, 1, 3)
t.print

Now "[X, Y] = Object" is the shortcut for: "set(Object, X, Y)"

Curly brackets removed, deep-functions integrated in .get, .put, ...

l = [[[2,3]]]
l[1,1,2].print
l.get(1,1,2).print

Deep-Functionality also for Table

t = Table(2)
t.add([11,12],[13,14]).add([21,22],[23,24])
t.get(2,1,2).print

Same with .get, .pull, .set, .put

Sequence.select

l = Range('a','i').toList.print
l.select( 3,5,1,2,8 ).print
l.selectLazy( 1,3,5,7,11,13 ).print

Same for Table, Map, ...

jmo_ext.jar

BrickLinkAPI

Set a maximum of allowed calls, to respect Bricklink-limits.

BrickLinkAPI.setLimit(4000)


JayMo 0.17 (soon)

New Types for Lib:

Json
Bricklink
Base64
...

New Types for Ext-Lib:

...

App-Exit-Hook

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

Keep App running and wait for a direct call of app.exit

app.keep

Assert-Functions which throws an error at invalid values

num = 123

( num.try.assert( $ < 50 ) ).print
( num.try.assertType( "Str" ) ).print
( num.try.assertIs( 'a' ) ).print
( num.try.assert( $ < 50, "My message" ) ).print
( num.try.assertType( "Str", "My message" ) ).print
( num.try.assertIs( 'a', "My message" ) ).print

Formatting atomic objects

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

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

For styling numbers:

123.style("????").print
123.style("0000").print
123.style("####").print

New functions for Chars, Char and Str

Chars

'3'.isNumber.print
'X'.isCaseUp.print
'x'.isCaseDown.print
' '.isBlank.print

Char

'x'.isLetter.print

Str

"".isEmpty.print

Cycle /* TODO testen */

counter = 0
c = Cycle
c.start( 1000 )

c::@
  counter =++
  ( counter >= 5 )

c.end

# app.keep

Date and day of week

d = Date(2001,11,17)
d.getDayOfWeek.print

Multi names for functions

::foo|bar|bak( Int a )
  ("foo "+a).print

this.foo(1)
this.bar(2)
this.bak(3)

Inline loop filter

9.times.breakAt(6,7,9).print
9.times.breakAtNot(1,2,3,4,6,7).print
9.times.breakIs(6,7,9).print
9.times.breakIsNot(1,2,3,4,6,7).print
9.times.breakIf( cur > 5 ).print
9.times.breakIfNot( cur < 4 ).print

Rotate a table

t = Table(2)
t.add("abc", 19)
t.add("def", 28)

t.print
t.rotate.print
t.rotate( _LEFT ).print
t.rotate( _RIGHT ).print

Null as alias for Nil

nil.print
null.print

Number with exponent

123.456e3.print
123.456E3.print

123.456e+3.print
123.456E+3.print

123.456e-3.print
123.456E-3.print

Hex/Oct/Bin now results in a number of type "Long"

0xABCD.type.print
0o1234.type.print
0b1010.type.print

Numbers with underlines

123_456_789.print
0xa_b_c_d.print
0xABCD_EF01.print
0o1_2_3_4.print
0o1234_56.print
0b1_0_1_0.print
0b1111_1101.print

Prefix replaces Namespace

>prefix("Foo")

::_Test
  "foo".print

_Test.type.print

Alternate notation for Parser-Switches

>prefix = "Foo"

... is the same as:

>prefix( "Foo" )

New classic types: Print, Echo

Print( 123 )
Print( 'a'++3, "lkj", 234 )

Echo( 123 )
Echo( 'a'++3, "lkj", 234 )

Select / Update

l = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' ]
l.select(3, 2, 6).print
l.update('X', 3, 2, 6).print
l.print

Lazy version where invalid positions will be filled with 'nil'

l.selectLazy(3, 12, 6).print
l.updateLazy('Y', 3, 12, 6).print

Short versions

l{3,2,6}.print
l{3,2,6} = 'X'
l{3,12,6}?.print
l{3,12,6}? = 'x'

This works also for: Map, Table, Tree

New type: Set

s = Set
s.add( 3 )
s.add( 9 )
s.add( 1 )
s.print

String.width / String.align

s = "abcdefghi"
s.width(  3 ).print
s.width( 20 ).replace(' ', '.').print

s.align(_LEFT, 20).replace(' ', '.').print
s.align(_RIGHT, 20).replace(' ', '.').print
s.align(_CENTER, 20).replace(' ', '.').print

String.scan

""""
<html><body><table border=1><tbody>
<tr><td>1</td><td>#FFFFFF</td><td>White</td></tr>
</tbody></table></body></html>
"""" => text

text.scan("<td>", "</td>").each.print

Table-Block

t = ||||
"foo",'a',6
"abc",'b',7
"def",'c',8
||||

t.print

Tree-Block

tree = >>>>
  item

no: 123 name: "foo" type: "PART"

  color_id = 81
  new_or_used: "U"
  quantity = 11
  sale_rate = 75
  unit_price = 1.23
  <<<<

tree.print.show

Object.tryUse

a = 5.tryUse( 9d ).div(2).print
a.print

a = 5.tryUse( 9d ).div(0).print
a.print

Type extends

::Foo(Int i)
  ::foo

("Foo "+i).print

::Bar(Int i) ^ Foo(i)
  ::bar

("Bar "+i).print

Foo(1).foo
Bar(2).bar
Bar(3).foo

Calculate and assign to the right

a = 0
[3,7,5,1].each +=> a
a.print

New classic type: Which

['A','D','G','Y'].each
  Which( % <= "F", % <= "L", true).get.print

['A','D','G','Y'].each.which( $ <= "F", $ <= "L", true).print

Unterstützen

Die Entwicklung von "JayMo" wird derzeit nur durch Eigeninitiative ermöglicht.

Erhalten:  0 €