Marco van de Voort wrote:
> On 2007-12-02, scott moore <nospam@[EMAIL PROTECTED]
> wrote:
>> Marco van de Voort wrote:
>>> On 2007-11-30, scott moore <nospam@[EMAIL PROTECTED]
> wrote:
>>>> It works, thank you. I wasn't able to get that to also work using the
>>>> IDE, but that's enough information to remove that restriction.
>>>>
>>>> I've tried to make the ISO 7185 - Delphi comparison as accurate as
>>>> possible, please don't hesitate to tell me if you see anything else
>>>> I got wrong.
>>> I've been playing in my mind to solve the alignment stuff using
pluggable
>>> file definitions, but I doubt it's possible. The problem is that the
>>> type->string functionality is handled by hardcoded routines, and the
>>> configurable part only does the actual writing of buffered strings.
>>>
>> Errr, alignment restriction ????
>
> Sorry, meant default fieldwidths, point 8.
I put together a short program for the FAQ that demonstrates the
differences between ISO 7185 and Delphi, it is attached below. If there
is anything here that got completed within FPC, let me know and I'll
note that in the FAQ.
And yes, while putting the program together I discovered another point.
Scott Moore
program dephitest(output);
label 1;
type r = record case b: boolean of true: (i: integer); false: (c: char)
end;
var f: text;
c: char;
rp: ^r;
s1: packed array [1..10] of char;
s2: array [1..10] of char;
procedure x(procedure y); begin y end;
procedure z; begin goto 1 end;
procedure y; begin end;
begin
{ 1: Procedure and function parameters }
x(y);
{ 2: Interprocedure goto }
z;
1:
{ 3: File buffer handling }
rewrite(f);
writeln(f, 'hi there');
reset(f);
c := f^;
{ 4: Sized variant record allocation }
new(rp, false);
{ 5: Pack and unpack }
s1 := 'hi there ';
unpack(s1, s2, 1);
pack(s2, 1, s1);
{ 6: Comments as synonyms *)
writeln('This should print');
{ 7: Replacement of eoln with space }
rewrite(f);
writeln(f);
reset(f);
read(f, c);
writeln('The value of eoln is: ', ord(c));
writeln('Should be same as space (32)');
{ 8: Numbers and booleans with default width }
writeln(1);
writeln(true);
writeln(false);
writeln('Should be similar to:');
writeln;
writeln(' 1');
writeln(' true');
writeln('false');
writeln;
writeln('(ie., justified right in field)');
{ 9: Anonymous (temp) files }
rewrite(f);
end.


|
23 Posts in Topic:
|
scott moore <nospam@[E |
2007-11-28 01:07:17 |
|
Marco van de Voort <ma |
2007-11-28 14:50:56 |
|
scott moore <nospam@[E |
2007-11-29 23:36:21 |
|
scott moore <nospam@[E |
2007-11-30 00:10:35 |
|
Marco van de Voort <ma |
2007-11-30 08:38:41 |
|
scott moore <nospam@[E |
2007-12-01 19:01:06 |
|
Marco van de Voort <ma |
2007-12-02 12:17:14 |
|
scott moore <nospam@[E |
2007-12-03 23:39:48 |
|
"Chris Burrows" |
2007-12-05 09:57:36 |
|
scott moore <nospam@[E |
2007-12-05 00:41:26 |
|
Marco van de Voort <ma |
2007-12-08 16:45:55 |
|
scott moore <nospam@[E |
2007-12-09 18:06:47 |
|
Richard Engebretson <e |
2007-11-29 06:47:30 |
|
scott moore <nospam@[E |
2007-11-29 23:41:53 |
|
Rene Kita <renekita@[E |
2007-11-30 13:16:24 |
|
scott moore <nospam@[E |
2007-12-01 19:01:45 |
|
"gedumer1" < |
2007-12-06 19:06:24 |
|
"gedumer1" < |
2007-12-06 19:10:15 |
|
"Chris Burrows" |
2007-12-07 13:01:29 |
|
scott moore <nospam@[E |
2007-12-09 18:07:39 |
|
Keith Bowes <keith_bow |
2007-12-23 05:05:29 |
|
Richard Engebretson <e |
2007-11-30 04:10:35 |
|
scott moore <nospam@[E |
2007-12-01 19:00:17 |
|