Recent

Author Topic: I don't get it.  (Read 1201 times)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
I don't get it.
« on: December 18, 2018, 02:28:02 pm »
function IsWordPresent( const W: string;  const S: string;  const WordDelims: TSysCharSet) :Boolean;

Present : Boolean;
aString = 'Invalid Day of week:

Present := IsWordPresent('Day', aString, ' ');

It dosen't like the ' ' as I give as the space delim of the string. Or is that not what it is askig for?
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: I don't get it.
« Reply #1 on: December 18, 2018, 02:38:31 pm »
It is a set. Use:
  Present := IsWordPresent('Day', aString, [' ']);

Whatever error it gave should be telling you that.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018