Pas2JS pascal source code
type
TMyRecord = record
Dummy: Integer;
end;
{ main.pas }
var
myVar: String = IntToStr(2);
Begin
if Declared('dummy') then
WriteLn('bug dummy');
if not Declared('TObject') then
WriteLn('bug TObject');
if not Declared('TObject.Create') then
WriteLn('bug TObject.Create');
if not Declared('Internal.TObject.Create') then
WriteLn('bug Internal.TObject.Create');
if not Declared('Internal.Sin') then
WriteLn('bug Internal.Sin');
if not Declared('TMyRecord') then
WriteLn('bug TMyRecord');
if not Declared('TMyRecord.Dummy') then
WriteLn('bug TMyRecord.Dummy');
if Declared('TMyRecord.Oops') then
WriteLn('bug TMyRecord.Oops');
{$IF Declared('dummy')}
WriteLn('Dummy is declared (bug)');
{$ENDIF}
{$IF not Declared('dummy')}
WriteLn('Dummy is not declared');
{$ENDIF}
{ <<<<<<<<<<<< CONSOLE OUTPUTS >>>>>>>>>>>>>>>>>>>
Dummy is not declared
}
var myVar = "2";
if (false) {
WriteLn("bug dummy");
}
if (!true) {
WriteLn("bug TObject");
}
if (!true) {
WriteLn("bug TObject.Create");
}
if (!true) {
WriteLn("bug Internal.TObject.Create");
}
if (!true) {
WriteLn("bug Internal.Sin");
}
if (!true) {
WriteLn("bug TMyRecord");
}
if (!true) {
WriteLn("bug TMyRecord.Dummy");
}
if (false) {
WriteLn("bug TMyRecord.Oops");
}
WriteLn("Dummy is not declared");