online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
program TestProj; //{$APPTYPE CONSOLE} //{$APPTYPE CONSOLE} //{$R *.res} uses SysUtils; function CutString(const Trenner : AnsiString; var s : AnsiString) : AnsiString; var i : integer; begin if s = '' then CutString := '' else begin i := pos(Trenner, s); if i = 0 then begin CutString := s; s := '' end else begin CutString := copy(s, 1, i - 1); delete(s, 1, i - 1 + length(Trenner)) end end end; function CodeObjectId(oid : AnsiString) : AnsiString; var s : Ansistring; i, n : integer; //testInt : integer; //testInt1 : integer; //testChar : AnsiChar; //testChar1 : AnsiChar; begin i := 0; while oid <> '' do begin inc(i); n := StrToInt(CutString('.', oid)); if i = 1 then s := ansichar(40 * n) else if i = 2 then s := ansichar(ord(s[1]) + n) else begin if n > $3fff then s := s + ansichar($80 or ((n shr 14) and $7f)) + ansichar($80 or ((n shr 7) and $7f)) + ansichar(n and $7f) else if n > $7f then begin s := s + ansichar($80 or ((n shr 7) and $7f)) + ansichar(n and $7f); //testInt := ($80 or ((n shr 7) and $7f)); //testChar := ansichar(testInt); //testInt1 := (n and $7f); //testChar1 := ansichar(testInt1); //writeln('testInt : ', testInt); //writeln('testChar : ', testChar); //writeln('testInt1 : ', testInt1); //writeln('testChar1 : ', testChar1); end else s := s + ansichar(n and $7f) end end; CodeObjectId := s end; var formatSettings : TFormatSettings; SysLocale : TSysLocale; pLocale : PAnsiChar; Locale, LocaleType: Integer; DefaultLocale: string; s: AnsiString; i : Integer; begin // try writeln('-----------------------------------------------'); s := CodeObjectId('1.3.12.2.1107.3.66.3.1'); for i := 1 to Length(s) do write(IntToHex(Ord(s[i]),2), ' '); writeln; writeln('-----------------------------------------------'); // except // on E: Exception do // Writeln(E.ClassName, ': ', E.Message); // end; end.

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue