[fpc-devel] Some new "in" operator functions
J. Gareth Moreton
gareth at moreton-family.com
Tue Mar 5 03:55:37 CET 2019
Hi everyone,
I've developed a couple of "in" operator overrides so you can use " in "
(useful in parsing tools, say, to see if a character belongs to a set of
delimiters) and " in ". e.g.
operator in(_Char: Char; _Set: array of Char): Boolean;
var
C: Char;
begin
Result := False;
for C in _Set do
if C = _Char then
begin
Result := True;
Exit;
end;
end;
Would these be welcome in one of the core units? And if so, which unit
would you recommend?
Gareth aka. Kit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190305/cc109790/attachment.html>
More information about the fpc-devel
mailing list