All pastes #15699 Raw Edit

jfs

public text v1 · immutable
#15699 ·published 2005-06-23 22:26 UTC
rendered paste body
//////////////// mylib.dpr ///////////////
library mylib;

uses myfunctions;

exports
  foo;

end.


/////////////// myfunctions.pas ////////////////
unit myfunctions;

interface

function foo(bar: integer): integer; stdcall;

implementation

function foo(bar: integer): integer; stdcall;
begin
  if bar <> 0 then
    result := foo(bar - bar div 2)
  else
    result := bar;
end;

end.