program testbot;
uses dos;
function exists(const fn:string):boolean;
var
f : text;
begin
{$I-}
if ( fn <> '' ) then
begin
exists:=True;
ioresult;
assign(f, fn);
reset(f);
if ( ioresult = 0 ) then close(f) else exists:=False;
end else exists:=False;
{$I+}
end;
fun
Dunno if this is the right place to post such a message, but here goes...
I would love to see a "pos" function that takes an additional parameter, being the
position in the string where it should START scanning. e.g.:
my_str = 'Hello, everybody... Hello, world!';
//123456789012345678901
> Dunno if this is the right place to post such a message, but here goes...
> I would love to see a "pos" function that takes an additional parameter, being
> the position in the string where it should START scanning. e.g.:
> my_str = 'Hello, everybody... Hello, world!';
> x := pos ('Hello', m