🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #95

Re: Searching for stringmatching code

#95
From: Dr John Stockton
Date: Thu, 25 Sep 1997 00:00
33 lines
2464 bytes
In article <342A0D04.2597@technodat.co.at> of Thu, 25 Sep 1997 09:04:36
in comp.lang.pascal.borland, Hans-Peter Haberlandner
<hab1@technodat.co.at> wrote:
>    function Spaces (n:byte):ShortString;
>    begin
>      FillChar(result[1],SizeOf(n),' ');
                          xxxxxxx x    -- just "n" needed, I think
>      result[0]:=Chr(n);
>    end;
>
>    procedure ClearRec (var Rec:TMaskRec);
>    begin
>      Rec.Name:=Spaces(SizeOf(Rec.Name)-1);
>      Rec.Ext:=Spaces(SizeOf(Rec.Ext)-1);
>    end;
or
procedure ClearRec (var Rec:TMaskRec);
begin with Rec do begin
  FillChar(Name[1], Pred(SizeOf(Name)), #32) ; 
  Name[0] := Pred(SizeOf(Name)) ;
  FillChar(Ext[1], Pred(SizeOf(Ext)), #32) ; 
  Ext[0] := Pred(SizeOf(Ext)) ;
  end end;

This thread is *excessively* cross-posted; I am answering for Pascal;
if it's different in Delphi, then 'caveat lector'.
 
-- 
John Stockton, Surrey, UK.    jrs@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web URL: http://www.merlyn.demon.co.uk/ - FAQqish topics, acronyms and links.
  Correct 4-line sig separator is as above, a line comprising "-- " (SoRFC1036)
  Before a reply, quote with ">" / "> ", known to good news readers (SoRFC1036)
Technical Details
Message-ID: <Jb4q$kAaQsK0Ew5T@merlyn.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3420E98C.24EF@technodat.co.at> <342A0D04.2597@technodat.co.at>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb0ea,52986aea61b152c
X-Google-Attributes: gidfb0ea,public
X-Google-Thread: fd817,52986aea61b152c
X-Google-Attributes: gidfd817,public
X-Google-Thread: f973b,52986aea61b152c
X-Google-Attributes: gidf973b,public
X-Google-Thread: 111659,52986aea61b152c
X-Google-Attributes: gid111659,public
X-Google-Thread: 1043cf,52986aea61b152c
X-Google-Attributes: gid1043cf,public
X-Google-Thread: f8256,52986aea61b152c
X-Google-Attributes: gidf8256,public
X-Google-Thread: 109d99,52986aea61b152c
X-Google-Attributes: gid109d99,public
From: Dr John Stockton <jrs@merlyn.demon.co.uk>
Subject: Re: Searching for stringmatching code
Date: 1997/09/25
Message-ID: <Jb4q$kAaQsK0Ew5T@merlyn.demon.co.uk>
X-Deja-AN: 275655824
Distribution: world
X-NNTP-Posting-Host: merlyn.demon.co.uk [158.152.233.145]
References: <3420E98C.24EF@technodat.co.at> <342A0D04.2597@technodat.co.at>
Organization: Home, Surrey, UK
Newsgroups: comp.lang.pascal.borland,borland.public.delphi.vcl.components.using,alt.comp.lang.borland-delphi,comp.lang.pascal.delphi.components.misc,comp.lang.pascal.delphi.components.usage,borland.public.delphi.thirdparty-tools,borland.public.delphi.objectpascal