#! mavscript-beanshell TEMPLATE.txt
# oder / or
#! mavscript --beanshell --init lib/init.bsh TEMPLATE.txt


mavscript-beanshell
-------------------

Eingabe / input:
Länge / length §m l = 10.30 §i m
Breite / width §m b =  2.37 §i m
Höhe / hight   §m h =  4.80 §i m

Ausgabe / output:
Das Volumen beträgt §m V = l*b*h §i = §m nf(V, 1) §o m³
Twice the volume is §m nf(2*V, 1) §o m³

Das Objekt ist §m if (l>b) antwort="länger als breit"; else {antwort = "breiter als lang";} §n§m antwort §o.
The object is rather §m if (h>b) answer="high"; else {answer = "wide";} §n§m answer §o.

Ein Würfel mit dem selben Volumen §m nf(V, 0) §o m³ hat die Seitenlänge
A cube of that volume has the side length
§m λ = pow(V, 1./3.) §i = §m λ §o ≈ §m nf(λ,2) §o m.


# Anmerkungen / Notes
# -------------------
# Die Datei lib/init.bsh definiert einige Funktionen, die zusammen mit Mavscript nützlich sind.
# Der Aufruf mavscript-beanshell lädt diese Datei, bevor die Vorlage verarbeitet wird.
#
# nf(25/7, 3);  --> 3.571                     Zahlenwert, mit 3 Stellen nach dem Komma
# min(double[] liste), max(double[] liste)    Minimal- / Maximalwert einer Liste
# sin(), pow(), etc.                          statt Math.sin(), Math.pow(), etc.

# The file lib/init.bsh defines some functions that are useful with mavscript.
# The command mavscript-beanshell loads that file prior to process the template.
# 
# nf(25/7, 3);  --> 3.571                     numerical value, with 3 decimal places
# min(double[] list), max(double[] list)      minimal / maximal value of a list
# sin(), pow(), etc.                          instead of Math.sin(), Math.pow(), etc.
