www.pudn.com > sswf-1.7.4-src.zip > compile.asc
/* compile.asc -- written by Alexis WILKE for Made to Order Software, Ltd. (c) 2005-2006 */
/*
Copyright (c) 2005-2006 Made to Order Software, Ltd.
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
const var first = unused;
const var attr = first;
const var attr_debug = true;
const var attr_release = !attr_debug;
function test(p1, p2 = 7, out p3) { return 55; }
var a: Integer;
do {
attr_release {
test(1, p3: a);
}
} while(a);
/*
array function test(a, b, c := 7.3, d: Integer := a * 2, unchecked abc) { return 5; }
function "++" (out a := 77, b, c := a ** 2)
{
var e;
restart:
do {
d = b + 5;
if(c) goto end;
else { test(a, d: 55, e); goto restart; }
b++;
} while(a);
end:
}
*/
/*
var s: String := "Hello!";
var total: Integer := 0;
for(var i: Integer := 0; i < s.length; ++i) {
total += s.charCodeAt(i);
}
class A
{
}
class B extends A
{
}
class C extends B
{
}
class Bar
{
const var jg2:Integer = 4 + 4;
function q(unprototyped):Void {
// ...
}
function any1:Void {}
function any2():Void {}
function any3(Void):Void {}
function p(a:A) {
print("Hmmm");
}
function p(a:B) {
var c = print("Hmmm");
}
};
interface Me
{
const var jg:Integer = 9;
};
class Foo extends Bar implements Me
{
function get m ():Integer { return 3; }
function n (s: Integer): String { return 1; }
const var gj:Integer = 3 + 17;
var t:Bar;
};
var a:String = "a", b:String = "g";
const var dbl := 3.5;
var test:Foo;
var btst:C;
var c:Integer = test.m;
d = c;
*/