El 25/05/2011 01:35 a.m., fpc-pascal-requ...@lists.freepascal.org escribió:
Question out of curiosity:
Is there a reason why you allocate an array "by hand"?

Yes, getmem return NIL, when no more memory is available.
SetLength, no return NIL, It is work with Exceptions.

My intention was whether it could be done without using dynamic arrays and Exceptions.
But two more questions:

1) At this program:

Var A:Ansistring;
Begin
 A:='Hi';
End.

The literal String is at Data area.
Is the A variable points to Data Segment. ?

2) My computer is little endian. (intel)
When I do this:

a: = $ ABFE5689 / / Little endian $ 8956FEAB, it is ok
Writeln (Hi (a)) / / Show $ ABFE, it is ok
Writeln (Lo (a)) / / Show $ 5689, it is ok

In a Big Endian computer. What shows Hi and Lo?

thanks.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to