rtl.module("System",[],function () {
"use strict";
var $mod = this;
$mod.$init = function () {
rtl.exitcode = 0;
};
});
rtl.module("RTLConsts",["System"],function () {
"use strict";
var $mod = this;
$mod.$resourcestrings = {SArgumentMissing: {org: 'Missing argument in format "%s"'}, SInvalidFormat: {org: 'Invalid format specifier : "%s"'}, SInvalidArgIndex: {org: 'Invalid argument index in format: "%s"'}, SListCapacityError: {org: "List capacity (%s) exceeded."}, SListCountError: {org: "List count (%s) out of bounds."}, SListIndexError: {org: "List index (%s) out of bounds"}, SSortedListError: {org: "Operation not allowed on sorted list"}, SDuplicateString: {org: "String list does not allow duplicates"}, SErrFindNeedsSortedList: {org: "Cannot use find on unsorted list"}, SInvalidName: {org: 'Invalid component name: "%s"'}, SInvalidBoolean: {org: '"%s" is not a valid boolean.'}, SDuplicateName: {org: 'Duplicate component name: "%s"'}, SErrInvalidDate: {org: 'Invalid date: "%s"'}, SErrInvalidTimeFormat: {org: 'Invalid time format: "%s"'}, SInvalidDateFormat: {org: 'Invalid date format: "%s"'}, SCantReadPropertyS: {org: 'Cannot read property "%s"'}, SCantWritePropertyS: {org: 'Cannot write property "%s"'}, SErrPropertyNotFound: {org: 'Unknown property: "%s"'}, SIndexedPropertyNeedsParams: {org: 'Indexed property "%s" needs parameters'}, SErrInvalidTypecast: {org: "Invalid class typecast"}, SErrInvalidInteger: {org: 'Invalid integer value: "%s"'}, SErrInvalidFloat: {org: 'Invalid floating-point value: "%s"'}, SInvalidDateTime: {org: "Invalid date-time value: %s"}, SInvalidCurrency: {org: "Invalid currency value: %s"}, SErrInvalidDayOfWeek: {org: "%d is not a valid day of the week"}, SErrInvalidTimeStamp: {org: 'Invalid date\/timestamp : "%s"'}, SErrInvalidDateWeek: {org: "%d %d %d is not a valid dateweek"}, SErrInvalidDayOfYear: {org: "Year %d does not have a day number %d"}, SErrInvalidDateMonthWeek: {org: "Year %d, month %d, Week %d and day %d is not a valid date."}, SErrInvalidDayOfWeekInMonth: {org: "Year %d Month %d NDow %d DOW %d is not a valid date"}, SInvalidJulianDate: {org: "%f Julian cannot be represented as a DateTime"}, SErrInvalidHourMinuteSecMsec: {org: "%d:%d:%d.%d is not a valid time specification"}, SInvalidGUID: {org: '"%s" is not a valid GUID value'}, SEmptyStreamIllegalReader: {org: "Illegal Nil stream for TReader constructor"}, SInvalidPropertyValue: {org: "Invalid value for property"}, SInvalidImage: {org: "Invalid stream format"}, SUnknownProperty: {org: 'Unknown property: "%s"'}, SUnknownPropertyType: {org: "Unknown property type %d"}, SAncestorNotFound: {org: 'Ancestor class for "%s" not found.'}, SUnsupportedPropertyVariantType: {org: "Unsupported property variant type %d"}, SPropertyException: {org: "Error reading %s%s%s: %s"}, SInvalidPropertyPath: {org: "Invalid property path"}, SReadOnlyProperty: {org: "Property is read-only"}, SClassNotFound: {org: 'Class "%s" not found'}, SEmptyStreamIllegalWriter: {org: "Illegal Nil stream for TWriter constructor"}, SErrInvalidPropertyType: {org: "Invalid property type from streamed property: %d"}, SParserExpected: {org: "Wrong token type: %s expected"}, SParserInvalidFloat: {org: "Invalid floating point number: %s"}, SParserInvalidInteger: {org: "Invalid integer number: %s"}, SParserUnterminatedString: {org: "Unterminated string"}, SParserWrongTokenType: {org: "Wrong token type: %s expected but %s found"}, SParserWrongTokenSymbol: {org: "Wrong token symbol: %s expected but %s found"}, SParserLocInfo: {org: " (at %d,%d, stream offset %.8x)"}, SParserUnterminatedBinValue: {org: "Unterminated byte value"}, SParserInvalidProperty: {org: "Invalid property"}};
});
rtl.module("JS",["System"],function () {
"use strict";
var $mod = this;
});
rtl.module("Classes",["System","RTLConsts","JS"],function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
$mod.$init = function () {
$impl.ClassList = Object.create(null);
};
},[],function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
$impl.ClassList = null;
});
rtl.module("Web",["System","JS"],function () {
"use strict";
var $mod = this;
});
// A Pascal Unit1 is translated into the following JavaScript structure:
rtl.module("Unit1",["System","Classes","JS","Web"],function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
this.MyIntfProc1 = function () {
$impl.dImpl = $mod.dIntf;
window.console.log($impl.A);
};
this.dIntf = 0.0;
$mod.$init = function () {
window.console.log("Unit1 initialization");
};
},null,function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
$impl.A = "Unit1";
$impl.dImpl = 0.0;
});
// A Pascal Unit2 is translated into the following JavaScript structure:
rtl.module("Unit2",["System","Classes","JS","Web"],function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
this.MyIntfProc2 = function () {
$impl.dImpl = $mod.dIntf;
window.console.log($impl.B);
};
this.dIntf = 0.0;
$mod.$init = function () {
window.console.log("Unit2 initialization");
};
},null,function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
$impl.B = "Unit2";
$impl.dImpl = 0.0;
});
// A Pascal Unit3 is translated into the following JavaScript structure:
rtl.module("Unit3",["System","Classes","JS","Web"],function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
this.MyIntfProc3 = function () {
$impl.dImpl = $mod.dIntf;
window.console.log($impl.C);
};
this.dIntf = 0.0;
$mod.$init = function () {
window.console.log("Unit3 initialization");
};
},null,function () {
"use strict";
var $mod = this;
var $impl = $mod.$impl;
$impl.C = "Unit3";
$impl.dImpl = 0.0;
});
// A Pascal Program is translated into the following JavaScript structure:
rtl.module("program",["System","Classes","JS","Web","Unit1","Unit2","Unit3"],function () {
"use strict";
var $mod = this;
$mod.$main = function () {
pas.Unit1.MyIntfProc1();
pas.Unit2.MyIntfProc2();
pas.Unit3.MyIntfProc3();
};
})