[fpc-devel] SizeOf( const typcasted as shortstring)

Dmitry Boyarintsev skalogryz.lists at gmail.com
Mon Aug 13 18:41:24 CEST 2018


On Mon, Aug 13, 2018 at 5:24 AM Sven Barth via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> It's odd that such expression compiles w/o any warnings or notes. (i.e.
>> "ignoring typecasting for constant value expressions")
>>
>
> Support for typecasts in untyped constants is by design and sometimes
> required, e.g. for unsigned 64-Bit values.
>
> Does it mean, that in case of ShortString casting the value of the
constant string should be extended up to 255 (256?) characters?

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180813/86341a6c/attachment.html>


More information about the fpc-devel mailing list