/* Allowed commands:
/*
/* Alias <var>[,<var>[,<var>[,...]]]
/*   Variables you want to use
/*
/* Set '<var>'[,'<var>'[,'<var>'[,...]]]!=<expression>
/*   Sets one ore more variables to the return value of an expression
/*
/* Display [<line>],['<var>'],"<Description>","<text>"
/*   Displays the variable on the list
/*   Use !$ in text to insert the var value here, e.g.:
/*   Display ,'Length',"Lenght of the object","!$ pixel"
/*   You can use this to show a seperating line:
/*     Display [<line>],-
/*
/* switch [<expression>]      defines beginning
/*   [...]                    executed if expression in switch is 1
/*   [case <expression>]      executed if expression in switch=expression
/*     [...]
/*     [skip <expression>]    skips until the next condition
/*     [...]
/*     [break [<expression>]] skips until force or endsw condition
/*     [...]
/*   [else]                   executed if previous section was not executed
/*     [...]
/*   [elseif <expression>]    executed if expression is 1
/*   [default]                following lines will also executed if nothing was executed yet
/*     [...]
/*   [other]                  following lines are only executed if nothing was executed yet
/*     [...]
/*   [force]                  always executed, even after a break
/*     [...]
/*   endsw                    defines end
/*
/*
/* :labelname              sets a label
/* goto <labelname>        jump to label
/*
/* Draw <Mode>,<expression>[,expression[,expression[,...]]]
/*   Draw modes:
/*     10 PIXEL    Pixel            x1,y1,color
/*     11 DOT      Dot              x1,y1,color
/*     20 LINE     Line             x1,y1,x2,y2,color
/*     21 RECT     Rectangle        x1,y1,x2,y2,color
/*     22 FRECT    Filled rectangle x1,y1,x2,y2,color
/*   not yet functional:
/*     0  LABEL    Label            x1,y1,color,expression
/*     1  CLABEL   Centered label   x1,y1,color,expression
/*     30 CIRCLE   Circle           x1,y1,radius,color
/*     39 EELLIPSE Enhanced Ellipse x1,y1,radius,start,end,aspect,color
/*     90 FUNC     Function         x1,y1,x2,y2,color,startx,starty,function,
/*
/* !!! Circle functions are currently disabled, as I 
/*
/* Other flags:
/*
/* Debug
/*   Enables debug features for this script

[Projects]
Test=Test
Zufallszahlen generieren=Random
Project calculation demonstration: Quader=Quader
Project calculation demonstration: Pythagoras (Gamma=90)=Pythagoras1

[Test]
Alias V1,V2,V3,V4,V5
Debug
debug "V1 is now $",'V1'
switch 'V1'
    set 'V5'!=1
  else
    switch 'V1'=2
      set 'V5'!=2
      else
      set 'V5'!=-1
      endsw
  case 3
    set 'V5'!=3
  elseif 'V1'=4
    set 'V5'!=4
  case 5
    set 'V5'!=51
    skip 1
    set 'V5'!=52
  case 6
    set 'V5'!=6
    break
    set 'V5'!=61
  case 5
    set 'V5'!=5
  case 6
    set 'V5'!=62
  case 7
    set 'V5'!=71
    break 0
    set 'V5'!=72
    break 1
    set 'V5'!=73
  case 7
    set 'V5'!=74
  force
  case 7
    set 'V5'!=7
  endsw
Display 0,'V1',"V1"
Display 1,'V2',"V2"
Display 2,'V3',"V3"
Display 3,'V4',
Display 4,'V5',"V5"

[Quader]
Alias Hoehe,Breite,Tiefe,Volumen
Alias gW,gH,Zoom,TiefeX
Set 'Volumen'!='Breite'*'Tiefe'*'Hoehe'
Set 'Breite'!='Volumen'/('Tiefe'*'Hoehe')
Set 'Tiefe'!='Volumen'/('Breite'*'Hoehe')
Set 'Hoehe'!='Volumen'/('Tiefe'*'Breite')
Debug
Display 0,'Breite',"Breite","!$ cm"
Display 1,'Hoehe',"Hoehe","!$ cm"
Display 2,'Tiefe',"Tiefe","!$ cm"
Display 3,-
Display 4,'Volumen',"Volumen","!$ cm3"
Set 'TiefeX'!='Tiefe'/sqr(2)/4*3
Set 'gW'!='Breite'+'TiefeX'
Set 'gH'!='Hoehe'+'TiefeX'
Set 'Zoom'!=200/(max('gW','gH'))
Draw 21,-100,-100,-100+'Breite'*'Zoom',-100+'Hoehe'*'Zoom'
Draw 20,-100+'TiefeX'*'Zoom',-100+'Hoehe'*'Zoom'+'TiefeX'*'Zoom',-100+'Breite'*'Zoom'+'TiefeX'*'Zoom',-100+'Hoehe'*'Zoom'+'TiefeX'*'Zoom'
Draw 20,-100+'Breite'*'Zoom'+'TiefeX'*'Zoom',-100+'TiefeX'*'Zoom',-100+'Breite'*'Zoom'+'TiefeX'*'Zoom',-100+'Hoehe'*'Zoom'+'TiefeX'*'Zoom'
Draw 20,-100,-100+'Hoehe'*'Zoom',-100+'TiefeX'*'Zoom',-100+'Hoehe'*'Zoom'+'TiefeX'*'Zoom'
Draw 20,-100+'Breite'*'Zoom',-100+'Hoehe'*'Zoom',-100+'Breite'*'Zoom'+'TiefeX'*'Zoom',-100+'Hoehe'*'Zoom'+'TiefeX'*'Zoom'
Draw 20,-100+'Breite'*'Zoom',-100,-100+'Breite'*'Zoom'+'TiefeX'*'Zoom',-100+'TiefeX'*'Zoom'

[Pythagoras1]
Debug
Alias aa,A1,A2
Alias bb,B1,B2
Alias cc,C1,C2
Alias zz
Alias aa1,aa2,bb1,bb2,cc1,cc2
Alias ha,hb,hc
Alias Temp1
Set 'B1','B2'
Set 'C1','C2'
Set 'aa'!=sqr('cc'^2-('bb'^2))
Set 'bb'!=sqr('cc'^2-('aa'^2))
Set 'cc'!=sqr('aa'^2+'bb'^2)
Set 'aa1'!='bb'^2/'cc'
Set 'hc'!=sqr('bb'^2-('aa1'^2))
Set 'zz'!=200/'cc'
Set 'A1'!=-100
Set 'A2'!=-100
Set 'B1'!='A1'+'cc'*'zz'
Set 'B2'!='A2'
Set 'C1'!='A1'+'aa1'*'zz'
Set 'C2'!='A2'+'hc'*'zz'
Draw 10,'A1','A2','B1','B2'
Draw 10,'B1','B2','C1','C2'
Draw 10,'C1','C2','A1','A2'
Display ,'aa',"a","!$ cm"
Display ,'bb',"b","!$ cm"
Display ,'cc',"c","!$ cm"
Circle 20,20,40,4
Draw 30,-20,-20,40,4
Draw 39,-40,-40,40,4,0,1,2

[Random]
Debug
Alias a,b,c
Set 'a'!=int(rnd(9999))/100
Set 'b'!=int(rnd(999))/10
Set 'c'!='a'*'b'
Display ,'c',"Erste Zahl","!$"
Display ,'a',"Zweite Zahl","!$"

