println( item... )

Prints the supplied items, followed by a newline.

:-) println( 56 );
56
There are 0 results
      

The println function prints a newline after it's finished printing the specified items. If you don't want the newline at the end use print instead.

Supplied items are displayed in different ways, depending on their type. The way different types are printed is as follows:

absent
is not displayed at all, e.g.
:-) println( absent );

There are 0 results
          
integers
are displayed without any surrounding characters, effectively as written, e.g.
:-) println( 56 );
56
There are 0 results
          
strings
are displayed without surrounding quotes, e.g.
:-) showln( "hello" );
hello
There are 0 results
          
characters
are displayed without surrounding quotes, e.g.
:-) println( 'a' );
a
There are 0 results
          
booleans
are displayed as true or false, e.g.
:-) println( true );
true
There are 0 results
:-) println( false );
false
There are 0 results
          
lists
each item in the list is printed one after the other. println's newline is printed at the end of the list, e.g.
:-) println( { "this", "is", "a", "list" } );
thisisalist
There are 0 results
          
maplets
have no specific way of printing, so we inherit from Java and get the standard Java string representation, e.g.
:-) println( "hello" ==> "there" );
org.millscript.millscript.Maplet@1d63e39
There are 0 results
          
note - you will not get exactly the same value printed if you try this example
maps
are displayed as a comma separated list of key-value pairs, surrounded by curly brackets, e.g.
:-) println( newMap( "hello" ==> "there", "a" ==> "map" ) );
{a=map, hello=there}
There are 0 results
          
functions
are displayed as something that looks a bit like XML, e.g.
:-) println( println );
<function println>
There are 0 results
          
in this case the display doesn't know how many arguments the function requires, in other cases this display will also show you the required number of arguments, e.g.
:-) function f( x ) => x endfunction;
There are 0 results
:-) println( f );
<function f(1)>
There are 0 results