On Mon, 2007-03-12 at 16:41 +, Henry Vermaak wrote:
> > > these results are (everything compiled with -CfSOFT for big endian):
> > >
> > > 1) writeln('Hello World') outputs "Hello WorldHello W". all other
> > > writeln and readln calls seem to work after that.
> > >
> > > 2) i get "Runtime e
Jonas Maebe wrote:
On 12 mrt 2007, at 16:19, Flávio Etrusco wrote:
And unless the compiler (programmer) use an extra variable just to
attain this behaviour, the value after the loop will 3 (i.e. end value
+1).
No, it can be anything, and the actual value even depends on the
compiler version
On 12 mrt 2007, at 16:19, Flávio Etrusco wrote:
And unless the compiler (programmer) use an extra variable just to
attain this behaviour, the value after the loop will 3 (i.e. end value
+1).
No, it can be anything, and the actual value even depends on the
compiler version.
Jonas_
I would NEVER rely on this in production code. The value of the control
variable of a For loop after execution should never be relied upon. A simple
change in the compiler at some future point could break a lot of your code.
To be honest I would call it a bug if a comipler didn't warn about it
(
> these results are (everything compiled with -CfSOFT for big endian):
>
> 1) writeln('Hello World') outputs "Hello WorldHello W". all other
> writeln and readln calls seem to work after that.
>
> 2) i get "Runtime error 207" when i attempt floating point operations.
Try to get a stack trace p
I would NEVER rely on this in production code. The value of the control
variable of a For loop after execution should never be relied upon. A simple
change in the compiler at some future point could break a lot of your code.
Cheers,
Andy
-Original Message-
From: [EMAIL PROTECTED]
[mailto
On 3/12/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
On Mon, 12 Mar 2007, Luiz Americo Pereira Camara wrote:
> Take the following example:
>
> for i:= 0 to 2 do;
> WriteLn(i);
>
> Can i safely assume that after the for loop the value of "i" is 2?
No. I think it is even specified in the
Henry Vermaak schrieb:
> here's an update on this. i tried a couple of different things to
> rule out what can be the problem. i got an nslu2 that i set up with a
> big endian firmware that runs a different kernel (2.6.16) version than
> my other board. the results were exactly consistent betwee
On Mon, 12 Mar 2007, Luiz Americo Pereira Camara wrote:
> Take the following example:
>
> for i:= 0 to 2 do;
> WriteLn(i);
>
> Can i safely assume that after the for loop the value of "i" is 2?
No. I think it is even specified in the pascal standard.
Michael.
__
Take the following example:
for i:= 0 to 2 do;
WriteLn(i);
Can i safely assume that after the for loop the value of "i" is 2?
Thanks in advance
Luiz
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/lis
here's an update on this. i tried a couple of different things to
rule out what can be the problem. i got an nslu2 that i set up with a
big endian firmware that runs a different kernel (2.6.16) version than
my other board. the results were exactly consistent between these
boards. i also tried
I made an other test with the dpmiexcp unit, downloaded from:
http://www.freepascal.org/cgi-bin/viewcvs.cgi/
and it still it doesn´t work.
The unit can be compiled with fpc 1.06 but couldn´t be linked:
ERROR while linking.
FPC 2.02 can compile and link the unit but it crashed again as
describe
12 matches
Mail list logo