Re: type conversion problem
- From: "Bruce Roberts" <dontsendtober@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 13:43:50 -0500
"Martin S" <shieldfire@xxxxxxxxx> wrote in message
news:43ddb4f7$0$683$b9f67a60@xxxxxxxxxxxxxxxxxxxxx
>I get type mismatch errors (untyped - string) on the following
Tough to say what the problem is since you don't indicate the line(s) that
generate the error(s).
>
> If FileExists('fontman.rc') Then
> //Read config file
> begin
> AssignFile(ConfigFile,'fontman.rc');
> Reset(ConfigFile);
> While not EOF(ConfigFile) do
> begin
> Lookingfor:= ReadLn(ConfigFile, Configtext);
ReadLn is a procedure, not a function. It does not return a type.
> Lookingfor:= AnsiRightStr(Lookingfor, MyFonts=);
Second parameter is not valid Delphi syntax.
> Lookingfor := Trim(Lookingfor);
> // Do something with result e.g.
> ShowMessage(Lookingfor);
> end;
> end
> Else
Its tough based on your post to figure out exactly what you are trying to
do, but it looks like you are reading a configuration file looking for an
entry MyFonts. If the file is structured as a standard INI file, use
tIniFile - see the help for details. An alternative is J. French's
suggestion that you look at tStringList - look up Names & Values properties
in the help.
.
- References:
- type conversion problem
- From: Martin S
- type conversion problem
- Prev by Date: Re: Recommendations for a text to speech component?
- Next by Date: Re: Keeping invisible forms from showing at start-up
- Previous by thread: Re: type conversion problem
- Index(es):