[fpc-devel] Embedded Strings on nRF51-DK

Sven Barth pascaldragon at googlemail.com
Thu Apr 16 14:19:38 CEST 2015


Am 16.04.2015 13:08 schrieb "Paul Michell" <Paul at michellcomputing.co.uk>:
> I assume this is because string handling support is not included in the
> embedded RTL generated with the compiler, or that I am not linking the
right
> object files if I need to do this by hand?  What would be the best way to
> enable string handling? Even short string handling would make FPC far more
> preferable to C for me for embedded work.

First of: I don't know whether non-Shortstrings are supported on embedded
(I haven't played with that target yet). So my following tips are geared
towards ShortString usage.

Which compiler mode are you using? You should use either mode FPC or at
most ObjFPC. Mode Delphi will switch on AnsiString. In any case you should
ensure that you haven't enabled AnsiStrings using $H+ (simply disable the
directive in that case).
Additionally you could declare your String variables explicitly as
ShortString instead of String.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20150416/68eb9cdc/attachment.html>


More information about the fpc-devel mailing list