Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!ucivax!milne From: milne@ics.uci.edu (Alastair Milne) Newsgroups: comp.lang.pascal Subject: Re: wish i could figure this out for myself Message-ID: <28276C38.19606@ics.uci.edu> Date: 8 May 91 03:10:47 GMT References: <1991May3.140719.5931@javelin.sim.es.com> <1991May3.150243.3793@e2big.mko.dec.com> <1991May3.170232.7710@javelin.sim.es.com> Distribution: na Organization: UC Irvine Department of ICS Lines: 22 In ricki@john.informatik.rwth-aachen.de (Richard Breuer) writes: >FUNCTION ValidChar(Ch:Char):Boolean; > CONST > ValidChars = 'ABCDEFHIJKLMNO'; (* and so on... *) > BEGIN > ValidChar := Pos(Ch,ValidChars)>0; > END; If it is faster to - push a string parameter (actually 2 of them) - call a function - scan the string doing substring checks - return the result than to do set inclusion, which should be done with a bitmask, then I will be quite surprised. Sets are one of Pascal's greatest features (greater, of course, in dialects that let you have nice big ones). Use them in good health. Alastair Milne