[fpc-devel] new string - question on usage
Sven Barth
pascaldragon at googlemail.com
Wed Oct 12 16:23:05 CEST 2011
Am 12.10.2011 15:35, schrieb Michael Schnell:
> On 10/12/2011 02:39 PM, Sven Barth wrote:
>> I'd say yes (the only point I'm really unsure about is "var"-arguments).
>>
> I did this list according to what I expect regarding to different
> numerical types (like integer and real) or two really different string
> types (like short string and long string).
>
> With that, an incorrectly used var parameter results in a compiler error
> message, while the other cases result in conversion (not really sure
> with type cast).
>
> In fact the var parameter case is most interesting regarding new strings.
>
> While in the other cases the system can decide at runtime what do do
> (with respect to the encoding ID (s) ), with a var parameter the type
> names might be used to generate an error message at compile time.
There was some discussion about how to handle var parameters, but I
don't remember the outcome anymore. AFAIK Delphi issues a compile error
(I don't know for sure though).
Regards,
Sven
More information about the fpc-devel
mailing list