Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Ansi -iso > Re: The standar...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 23 Topic 196 of 215
Post > Topic >>

Re: The standard Pascal web site, moved and updated!

by scott moore <nospam@[EMAIL PROTECTED] > Dec 3, 2007 at 11:39 PM

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:
The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-11-28 01:07:17 
Re: The standard Pascal web site, moved and updated!
Marco van de Voort <ma  2007-11-28 14:50:56 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-11-29 23:36:21 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-11-30 00:10:35 
Re: The standard Pascal web site, moved and updated!
Marco van de Voort <ma  2007-11-30 08:38:41 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-01 19:01:06 
Re: The standard Pascal web site, moved and updated!
Marco van de Voort <ma  2007-12-02 12:17:14 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-03 23:39:48 
Re: The standard Pascal web site, moved and updated!
"Chris Burrows"  2007-12-05 09:57:36 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-05 00:41:26 
Re: The standard Pascal web site, moved and updated!
Marco van de Voort <ma  2007-12-08 16:45:55 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-09 18:06:47 
Re: The standard Pascal web site, moved and updated!
Richard Engebretson <e  2007-11-29 06:47:30 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-11-29 23:41:53 
Re: The standard Pascal web site, moved and updated!
Rene Kita <renekita@[E  2007-11-30 13:16:24 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-01 19:01:45 
Re: The standard Pascal web site, moved and updated!
"gedumer1" <  2007-12-06 19:06:24 
Re: The standard Pascal web site, moved and updated!
"gedumer1" <  2007-12-06 19:10:15 
Re: The standard Pascal web site, moved and updated!
"Chris Burrows"  2007-12-07 13:01:29 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-09 18:07:39 
Re: The standard Pascal web site, moved and updated!
Keith Bowes <keith_bow  2007-12-23 05:05:29 
Re: The standard Pascal web site, moved and updated!
Richard Engebretson <e  2007-11-30 04:10:35 
Re: The standard Pascal web site, moved and updated!
scott moore <nospam@[E  2007-12-01 19:00:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 18:20:49 CDT 2008.