El 06/03/2013 13:47, Jonas Maebe escribió:
2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but
with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not
have 2.6.2 to test):
That's because you are passing an uninitialized value to a
var-parameter. That only generates
El 06/03/2013 13:47, Jonas Maebe escribió:
2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but
with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not
have 2.6.2 to test):
That's because you are passing an uninitialized value to a
var-parameter. That only generates
On 06 Mar 2013, at 13:37, José Mejuto wrote:
2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but
with this one 2.6.0, and 2.7.1 trunk does not generate it (I do not
have 2.6.2 to test):
That's because you are passing an uninitialized value to a var-
parameter. That only ge
El 06/03/2013 10:40, Jonas Maebe escribió:
FPC 2.6.2 does give a warning (code is from
http://bugs.freepascal.org/view.php?id=20907#c55064 ):
[...]
It could also fail in 2.6.x, just less often.
Hello,
2.6.0, 2.6.2 and 2.7.1 trunk produces a warning with that code, but with
this one 2.6.0,
On 05 Mar 2013, at 12:34, José Mejuto wrote:
El 05/03/2013 11:23, Howard Page-Clark escribió:
The code that makes me wonder something is wrong is this one:
[...]
For me (win32, FPC 2.6.2) the output is identical (= "A") whether
or not
Result in TheA() is initialised manually or not. P
El 05/03/2013 11:23, Howard Page-Clark escribió:
The code that makes me wonder something is wrong is this one:
[...]
For me (win32, FPC 2.6.2) the output is identical (= "A") whether or not
Result in TheA() is initialised manually or not. Perhaps 2.7.1 has a
regression here if it differs fo
Am 05.03.2013 11:27, schrieb Michael Van Canneyt:
On Tue, 5 Mar 2013, Howard Page-Clark wrote:
On 04/03/13 10:33, José Mejuto wrote:
The code that makes me wonder something is wrong is this one:
---
{$mode objfpc}
{$h+}
procedure TheB(var aTheA: string);
b
On Tue, 5 Mar 2013, Howard Page-Clark wrote:
On 04/03/13 10:33, José Mejuto wrote:
The code that makes me wonder something is wrong is this one:
---
{$mode objfpc}
{$h+}
procedure TheB(var aTheA: string);
begin
aTheA:=aTheA+'A';
end;
function TheA(): st
On 04/03/13 10:33, José Mejuto wrote:
The code that makes me wonder something is wrong is this one:
---
{$mode objfpc}
{$h+}
procedure TheB(var aTheA: string);
begin
aTheA:=aTheA+'A';
end;
function TheA(): string;
begin
//Result:='';
TheB(Result);
en
El 04/03/2013 22:16, Michael Van Canneyt escribió:
That report says the issue was assigned to Jonas and fixed in revision
20427 (ver 2.6.1).
I find the current release (2.6.2) initialises a string function
result to EmptyStr as you would hope.
[...]
Prints AA
Hello,
I'm asking because today
On Mon, Mar 4, 2013 at 5:23 PM, Juha Manninen wrote:
> On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto wrote:
>> What's the expected output of this code ?
>>
>> function TheA(): string;
>> begin
>> Result:=Result+'A';
>> end;
>>
>> writeln(TheA());
>>
>> I thought that when the result type is an au
On Mon, Mar 4, 2013 at 10:51 PM, Howard Page-Clark wrote:
> That report says the issue was assigned to Jonas and fixed in revision 20427
> (ver 2.6.1).
> I find the current release (2.6.2) initialises a string function result to
> EmptyStr as you would hope.
Ok, that sounds good.
I must have misu
On Mon, 4 Mar 2013, Howard Page-Clark wrote:
On 04/03/13 8:23, Juha Manninen wrote:
On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto wrote:
What's the expected output of this code ?
function TheA(): string;
begin
Result:=Result+'A';
end;
writeln(TheA());
I thought that when the result type
On 04/03/13 8:23, Juha Manninen wrote:
On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto wrote:
What's the expected output of this code ?
function TheA(): string;
begin
Result:=Result+'A';
end;
writeln(TheA());
I thought that when the result type is an automated one its value gets
initialized..
On Mon, Mar 4, 2013 at 9:21 PM, José Mejuto wrote:
> What's the expected output of this code ?
>
> function TheA(): string;
> begin
> Result:=Result+'A';
> end;
>
> writeln(TheA());
>
> I thought that when the result type is an automated one its value gets
> initialized... Maybe I'm wrong...
Ye
Hello,
What's the expected output of this code ?
function TheA(): string;
begin
Result:=Result+'A';
end;
writeln(TheA());
I thought that when the result type is an automated one its value gets
initialized... Maybe I'm wrong...
--
___
fpc-pascal
16 matches
Mail list logo