online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
{$mode objfpc}{$H+} program Hello; uses Classes, SysUtils{, LazUTF8}; procedure print_stream(strm: tbytesstream); var b: byte; i: integer; begin for i := 0 to strm.size-1 do begin b := strm.bytes[i]; write(inttohex(b)); write(' '); end; writeln(); write('bytes = '); write(strm.size); writeln(); end; var s: string; strm: {TBytesStream} TStringStream; //&in, out: TBytes; begin writeln(); //s := 'TEST'; s := 'ะญั‚ะพ ัั‚ั€ะพะบะฐ'; //&in := BytesOf(str); //out := TEncoding.Convert(TEncoding.UTF8, TEncoding.{BigEndian}Unicode, &in); strm := TStringStream{TBytesStream}.create; strm.writebyte(length(s)); strm.writebyte($00); // add some bytes before strm.writeunicodestring(utf8decode(s)); strm.writebyte($00); // and after string print_stream(strm); strm.free; 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