[fpc-pascal] Version 2.1.4
Florian Klaempfl
florian at freepascal.org
Sat Jun 2 20:16:26 CEST 2007
Rainer Stratmann schrieb:
> Am Samstag, 2. Juni 2007 19:59 schrieb Peter Vreman:
>> At 19:58 2-6-2007, you wrote:
>>> Hello,
>>>
>>> 1.
>>>
>>> var s:string;
>>> ...
>>> s[1]:='#'; --> causes an access violation
>>>
>>> 2.
>>>
>>> Why is it no more possible to assign the length index s[0] in a string?
>>> I find that is too much security to supress that.
>>> It is cutting responsibility from the programmers.
>> You are using ansistrings instead of shortstrings. Use SetLength()
>> first to allocate memory.
>>
> Does that mean that
>
> var s:string; is definig an ansistring in delphi mode?
>
> In the previous version this works,
Unlikely. string meant for years ansistring in objfpc/delphi mode.
> is it now changing generally to
> ansistrings?
> How can I assign "normal" pascalstrings?
shortstring
> Is there a description about the behaviour of strings and ansistrings in the
> various modes?
>
> Kind regards,
> Rainer
>
>> Peter
>>
>> _______________________________________________
>> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list