Pas2JS pascal source code
type
TAClass = class external
procedure Hello;
end;
type
TBClass = class external 'hello'
procedure Hello; external 'world';
end;
{$IFDEF JS_CODEGEN}
asm
function Dummy(p) {
WriteLn('Fake: Unhandled call to external symbol "Dummy" from [line: 25, column: 4]')
}
end;
{$ENDIF}
function Dummy(param: Integer): String; external;
function Dummy2(param: Integer): String; external 'byebye';
{ main.pas }
Begin
try
Dummy(12);
except
on E: Exception do
WriteLn(E.Message);
end;
{ <<< CONSOLE OUTPUTS >>>
ReferenceError, Dummy is not defined
}
// Unhandled call to external symbol "Dummy" from [line: 25, column: 4]
try {
Dummy(12);
} catch ($e) {
var E = $W($e);
WriteLn(E.FMessage) }