Yoix    hoch http://www.research.att.com/sw/tools/yoix/
 
  Beschreibung: Yoix is a scripting language and interpreter written in pure Java. The language itself resembles a bit of both Java's and/or C's syntax, but is much more usable for scripting.


  Fakultät   Michael Neumann
/* 
 * Berechnen der Fakultät
 */

fac(n) {
   if (n > 1) return n * fac(n-1);
   else return 1;
} 

yoix.stdio.printf("fac(6) = %d\n", fac(6));
Berechnet die Fakultät. Ergibt 720.


 Hello World (1)   Michael Neumann
// Hello World in Yoix

import yoix.stdio.*;

printf("Hello World\n");
Gibt "Hello World" auf dem Bildschirm aus.


 Hello World (2)   Michael Neumann
stdout.nextline = "Hello World"; 
Gibt "Hello World" auf dem Bildschirm aus.


 Squares (1)   Michael Neumann
int    i;
String str = "";
   
for (i = 1; i <= 10; i++) {
  str += toString(i*i) + " ";
}

yoix.stdio.printf(str + "\n");
Gibt die Quadrate von 1 bis 10 aus.


 Squares (2)   Michael Neumann
int   i;
Array arr = { 1,2,3,4,5,6,7,8,9,10 };
     
for (i = 0; i < arr@length; i++) {
  a[i] *= a[i];
}

stdout.nextline = toString(a);
Gibt die Quadrate von 1 bis 10 aus.