[fpc-pascal] type of resourcestrings

Marc Santhoff M.Santhoff at t-online.de
Wed Apr 6 16:46:41 CEST 2005


Am Mi, den 06.04.2005 schrieb Michael Van Canneyt um 16:36:
> On Wed, 6 Apr 2005, Marc Santhoff wrote:
> 
> > Hi,
> >
> > when defining resourcestrings the definition looks like this:
> >
> > 	mystring = 'anything';
> >
> > A typed definition is not allowed:
> >
> > 	mystring: AnsiString = 'anything';
> >
> > gives an error.
> 
> It should. A typed definition would imply that you can set it at
> runtime, which is not the case. (At least, not without the special API
> for it)

Setting at runtime is my intention, I'm localizing GUI strings ... what
I don't understand is: Is this a compiler error or a logical clue, it
should work but cannot because the API you mentioned is missing?

Free Pascal Compiler version 1.9.4 [2004/05/31] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: FreeBSD/ELF for i386

> >
> > How are resourcestrings typed?
> >
> > I expect them to be short strings or ansi strings if $H+ is set. Is this
> > correct?
> 
> No. They are always ansistrings.

Okay, I'm fine with that. :)

Thank you,
Marc





More information about the fpc-pascal mailing list