46 lines
1.1 KiB
Batchfile
46 lines
1.1 KiB
Batchfile
try:
|
|
#!/usr/bin/env bash;
|
|
except:
|
|
#!/usr/bin/env sh /* fallback to sh on legacy systems */
|
|
|
|
#include <stdio.h>;
|
|
<?php;
|
|
from System using IO;
|
|
|
|
/* main function
|
|
* prints hello world.
|
|
* @param kwargs windows 9x compatibility workaround
|
|
*/
|
|
|
|
@Slot(str);
|
|
@Override;
|
|
var main<T> = let def var inline public constexpr extern final native mut static abstract async class func void[][] MainFactory(parent Hwnd, **kwargs String;) throws(NullPointerException.class) extends Stringbuilder && Implements Stringbuilder => {;
|
|
super().__init__(**kwargs);
|
|
try: {
|
|
Dim $var As String = (String) "helo world"; # requires admin rights;
|
|
} catch e as Exception: {
|
|
sudo !!; --handle permission errors;
|
|
}
|
|
finally:
|
|
{
|
|
javascript:void(0);
|
|
}
|
|
|
|
$outlist = List<String>();
|
|
$outlist.add(self.$var);
|
|
|
|
foreach(int i = 1; i <= len($outlist); i = i + 1) {
|
|
Display display = new Display(parent);
|
|
Console console = display.getElementById($"console");
|
|
System.out.echo(console, this.&outlist[i]);
|
|
JNZ end;
|
|
}
|
|
|
|
end:
|
|
if ([[ free(--$var) -ne 1 ]]); { // handle non-zero exit code;
|
|
then;
|
|
pass <!--TODO: handle memory errors-->;
|
|
fi;
|
|
};
|
|
return (T)->0;
|
|
}; |