Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fpc-src / usr / share / fpcsrc / 3.0.0 / tests / webtbs / tw13512.pp
Size: Mime:
{$mode objfpc}

Program BCDTest;

Uses SysUtils;

var
  gotexcept: boolean;
Begin
    WriteLn (BCDToInt ($1234)); { should retuen 1234 }
    if (BCDToInt ($1234)) <> 1234 then
      halt(1);

    gotexcept:=false;
    try
      WriteLn (BCDToInt ($A0));   { Invalid value }
    except
      gotexcept:=true;
    end;
    if not gotexcept then
      halt(1);

    WriteLn (BCDToInt ($7D));   { should return -7 }
    if (BCDToInt ($7D)) <> -7 then
      halt(2);
End.