Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-10

VMS Pascal Compiler mode

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Apthorp

Posted this on the Lazarus forum but was suggested I should send it here, Thanks Richard.

richardapthorp<http://forum.lazarus.freepascal.org/index.php?action=profile;u=55961>

* Newbie
*
* Posts: 1
*
[http://forum.lazarus.freepascal.org/Themes/default/images/post/xx.gif] VMS PASCAL compiler mode<http://forum.lazarus.freepascal.org/index.php/topic,26239.msg160912.html#msg160912> < on: Today at 11:04:28 am >
Porting a large project running on the VMS operating system written in Pascal to Linux and Free Pascal. However there is no compiler switch for HP VMS Pascal. Would be really useful if just the main syntax differences could be catered for eg: Specifying parameter names in procedure calls (instead of overload) - I could provide a list. Noticed GNU Pascal has such a compiler switch.
Anyway in the middle of writing a pre-processor to make the syntax changes but wondering if anybody has done something similar? HP having just announced VMS retirement after 35 years there must be a lot of HP Pascal around some of which will need to be ported! [http://forum.lazarus.freepascal.org/Themes/default/images/ip.gif]Logged BigChimp<http://forum.lazarus.freepascal.org/index.php?action=profile;u=46149>

* Hero Member
* [*] [*] [*] [*] [*]
* [http://forum.lazarus.freepascal.org/index.php?action=dlattach;attach=2831;type=avatar] <http://forum.lazarus.freepascal.org/index.php?action=profile;u=46149>
* Posts: 5621
* Add to the wiki - it's free ;)
*

* [FPCTwit twitter, PaperTiger scanning and other open source projects] <https://bitbucket.org/reiniero/> [http://forum.lazarus.freepascal.org/Themes/default/images/post/xx.gif] Re: VMS PASCAL compiler mode<http://forum.lazarus.freepascal.org/index.php/topic,26239.msg160913.html#msg160913> < Reply #1 on: Today at 11:16:37 am >
If you don't get an answer here, I'd suggest posting on the fpc-devel list as that is where a lot of fpc developers are subscribed... Not all of them would read this forum.

Reply by email

Jonas Maebe
to Richard Apthorp
Richard Apthorp wrote
Posted this on the Lazarus forum but was suggested I should send it here, Thanks Richard.

Note that this person is not subscribed to the list, so CC him when replying if you want him to see your messages.

Jonas

Reply by email

Sven Barth
to Richard Apthorp: Posted this on the Lazarus forum but was suggested I should send it here, Thanks Richard.…
Richard Apthorp wrote 11 lines
Porting a large project running on the VMS operating system written in Pascal to Linux and Free Pascal. However there is no compiler switch for HP VMS Pascal. Would be really useful if just the main syntax differences could be catered for eg: Specifying parameter names in procedure calls (instead of overload) - I could provide a list. Noticed GNU Pascal has such a compiler switch. Anyway in the middle of writing a pre-processor to make the syntax changes but wondering if anybody has done something similar? HP having just announced VMS retirement after 35 years there must be a lot of HP Pascal around some of which will need to be ported!

I'm not aware of anyone developing a compiler mode for HP VMS Pascal (or Compaq Pascal as it seems to be called). So feel free to implement it yourself (you could start small by only adding the new mode first and maybe a compatibility unit for special type declarations that will be automatically loaded like the ObjPas unit for modes Delphi and ObjFPC or the MacPas unit for the Mac Pascal mode).

Regards,
Sven

Reply by email

Sven Barth
Richard Apthorp wrote 12 lines
Hi Sven, Thanks for the reply. Yes some of it could be handled by a unit for special types etc but not sure what adding a new mode means or how to do it, could this handle differences such as - Type conversions: Var::integer instead of integer(var) Passing in characters arrays: Procedure Proc(str : array [A..B] of char); Defaulting parameters Procedure Proc(p1 : integer := 1; p2,p3:integer); And calling it in different ways: Proc(,2,3); Proc(1,p3 := 3, p2:= 2);

Maybe you should indeed first try to list all differences then we could help you with judging how hard they are to be implemented. E.g. calling arguments by name is already implemented for some special cases (AFAIK for IDispatchable interfaces or something like that) so that would already be there. And then we could guide you for implementing them starting from the easy ones to the hard ones so that you could get familiar with the compiler.

Regards,
Sven

PS: Please keep the fpc-devel list as recipent as well (either as main To or as CC) so that others interested in this topic can read your messages as well. Maybe it would be better if you'd subscribe to the list, because then others don't need to CC you if they answer.

Show quoted text 25 lines
-----Original Message----- From: Sven Barth Sent: 25 October 2014 13:10 To: FPC developers' list; Richard Apthorp Subject: Re: [fpc-devel] VMS Pascal Compiler mode On 24.10.2014 13:22, Richard Apthorp wrote: > Porting a large project running on the VMS operating system written in > Pascal to Linux and Free Pascal. > However there is no compiler switch for HP VMS Pascal. Would be really > useful if just the main syntax differences could be catered for eg: > Specifying parameter names in procedure calls (instead of overload) - > I could provide a list. > Noticed GNU Pascal has such a compiler switch. > Anyway in the middle of writing a pre-processor to make the syntax > changes but wondering if anybody has done something similar? > HP having just announced VMS retirement after 35 years there must be a > lot of HP Pascal around some of which will need to be ported! I'm not aware of anyone developing a compiler mode for HP VMS Pascal (or Compaq Pascal as it seems to be called). So feel free to implement it yourself (you could start small by only adding the new mode first and maybe a compatibility unit for special type declarations that will be automatically loaded like the ObjPas unit for modes Delphi and ObjFPC or the MacPas unit for the Mac Pascal mode). Regards, Sven

Reply by email

Flávio Etrusco
to Sven Barth
Sven Barth wrote 27 lines
On 27.10.2014 11:51, Richard Apthorp wrote: > > Hi Sven, > > Thanks for the reply. Yes some of it could be handled by a unit for > special types etc but not sure what adding a new mode means or how to do > it, could this handle differences such as - > Type conversions: > Var::integer instead of integer(var) > Passing in characters arrays: > Procedure Proc(str : array [A..B] of char); > Defaulting parameters > Procedure Proc(p1 : integer := 1; p2,p3:integer); > And calling it in different ways: > Proc(,2,3); > Proc(1,p3 := 3, p2:= 2); Maybe you should indeed first try to list all differences then we could help you with judging how hard they are to be implemented. E.g. calling arguments by name is already implemented for some special cases (AFAIK for IDispatchable interfaces or something like that) so that would already be there. And then we could guide you for implementing them starting from the easy ones to the hard ones so that you could get familiar with the compiler. Regards, Sven

It would be really nice if one could enable calling arguments by name using modeswitch ;-)
http://www.freepascal.org/docs-html/prog/progsu106.html

Show quoted text 37 lines
PS: Please keep the fpc-devel list as recipent as well (either as main To or as CC) so that others interested in this topic can read your messages as well. Maybe it would be better if you'd subscribe to the list, because then others don't need to CC you if they answer. > > -----Original Message----- > From: Sven Barth > Sent: 25 October 2014 13:10 > To: FPC developers' list; Richard Apthorp > Subject: Re: [fpc-devel] VMS Pascal Compiler mode > > On 24.10.2014 13:22, Richard Apthorp wrote: >> >> Porting a large project running on the VMS operating system written in >> Pascal to Linux and Free Pascal. >> However there is no compiler switch for HP VMS Pascal. Would be really >> useful if just the main syntax differences could be catered for eg: >> Specifying parameter names in procedure calls (instead of overload) - >> I could provide a list. >> Noticed GNU Pascal has such a compiler switch. >> Anyway in the middle of writing a pre-processor to make the syntax >> changes but wondering if anybody has done something similar? >> HP having just announced VMS retirement after 35 years there must be a >> lot of HP Pascal around some of which will need to be ported! > > > I'm not aware of anyone developing a compiler mode for HP VMS Pascal (or > Compaq Pascal as it seems to be called). So feel free to implement it > yourself (you could start small by only adding the new mode first and maybe > a compatibility unit for special type declarations that will be > automatically loaded like the ObjPas unit for modes Delphi and ObjFPC or the > MacPas unit for the Mac Pascal mode). > > Regards, > Sven

Regards,
Flávio

Reply by email

Richard Apthorp
to Sven Barth: Maybe you should indeed first try to list all differences then we could help you with…

Hi Sven,

Actually found that HP have a documented list:
http://h71000.www7.hp.com/doc/82final/6083/6083pro_032.html#extensions_app I'm not sure I feel qualified to change the compiler but as I work on this porting project I will be creating a list of the main changes which I could then decide if beneficial to create a new compiler mode for (with a lot of help I hope!!!) Thanks again for your advice, Richard.

Earlier message 52 lines
-----Original Message----- From: Sven Barth Sent: 27 October 2014 11:38 To: FPC developers' list Cc: Richard Apthorp Subject: Re: [fpc-devel] VMS Pascal Compiler mode On 27.10.2014 11:51, Richard Apthorp wrote: > Hi Sven, > > Thanks for the reply. Yes some of it could be handled by a unit for > special types etc but not sure what adding a new mode means or how to do it, could this handle differences such as - Type conversions: > Var::integer instead of integer(var) > Passing in characters arrays: > Procedure Proc(str : array [A..B] of char); Defaulting parameters > Procedure Proc(p1 : integer := 1; p2,p3:integer); And calling it in > different ways: > Proc(,2,3); > Proc(1,p3 := 3, p2:= 2); Maybe you should indeed first try to list all differences then we could help you with judging how hard they are to be implemented. E.g. calling arguments by name is already implemented for some special cases (AFAIK for IDispatchable interfaces or something like that) so that would already be there. And then we could guide you for implementing them starting from the easy ones to the hard ones so that you could get familiar with the compiler. Regards, Sven PS: Please keep the fpc-devel list as recipent as well (either as main To or as CC) so that others interested in this topic can read your messages as well. Maybe it would be better if you'd subscribe to the list, because then others don't need to CC you if they answer. > > -----Original Message----- > From: Sven Barth > Sent: 25 October 2014 13:10 > To: FPC developers' list; Richard Apthorp > Subject: Re: [fpc-devel] VMS Pascal Compiler mode > > On 24.10.2014 13:22, Richard Apthorp wrote: >> Porting a large project running on the VMS operating system written >> in Pascal to Linux and Free Pascal. >> However there is no compiler switch for HP VMS Pascal. Would be >> really useful if just the main syntax differences could be catered for eg: >> Specifying parameter names in procedure calls (instead of overload) - >> I could provide a list. >> Noticed GNU Pascal has such a compiler switch. >> Anyway in the middle of writing a pre-processor to make the syntax >> changes but wondering if anybody has done something similar? >> HP having just announced VMS retirement after 35 years there must be >> a lot of HP Pascal around some of which will need to be ported! > > I'm not aware of anyone developing a compiler mode for HP VMS Pascal (or Compaq Pascal as it seems to be called). So feel free to implement it yourself (you could start small by only adding the new mode first and maybe a compatibility unit for special type declarations that will be automatically loaded like the ObjPas unit for modes Delphi and ObjFPC or the MacPas unit for the Mac Pascal mode). > > Regards, > Sven >

Reply by email

Mark Morgan Lloyd
to Richard Apthorp
Richard Apthorp wrote 6 lines
Hi Sven, Actually found that HP have a documented list: http://h71000.www7.hp.com/doc/82final/6083/6083pro_032.html#extensions_app I'm not sure I feel qualified to change the compiler but as I work on this porting project I will be creating a list of the main changes which I could then decide if beneficial to create a new compiler mode for (with a lot of help I hope!!!) Thanks again for your advice, Richard.

One useful thing might be to create a test case for each extension as you find that FPC (in the default mode ** ) doesn't handle it, and to submit it as a bug for discussion. That would enable all the "tentative VMS mode" activity to be at least cross-linked.

I see from your reference that the compiler extends ANSI/ISO Pascal, but there's no indication of whether, when it was written, it was based on Jensen & Wirth or the somewhat later ISO standard. Was it written from scratch, or was it initially based on something like the P6 compiler which I believe was on some DEC systems?

** Anybody: what's the state of the -Miso mode? I don't see it in the -h output.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sven Barth
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 16 lines
Richard Apthorp wrote: > Hi Sven, > > Actually found that HP have a documented list: > http://h71000.www7.hp.com/doc/82final/6083/6083pro_032.html#extensions_app > > I'm not sure I feel qualified to change the compiler but as I work on > this porting project I will be creating a list of the main changes > which I could then decide if beneficial to create a new compiler mode > for (with a lot of help I hope!!!) > Thanks again for your advice, Richard. One useful thing might be to create a test case for each extension as you find that FPC (in the default mode ** ) doesn't handle it, and to submit it as a bug for discussion. That would enable all the "tentative VMS mode" activity to be at least cross-linked.

Yes, that might be a good idea.

Show quoted text 6 lines
I see from your reference that the compiler extends ANSI/ISO Pascal, but there's no indication of whether, when it was written, it was based on Jensen & Wirth or the somewhat later ISO standard. Was it written from scratch, or was it initially based on something like the P6 compiler which I believe was on some DEC systems?

Note: As Jonas wrote in an earlier mail you need to add Richard as CC as he's not (yet) subscribed to the mailing list.

** Anybody: what's the state of the -Miso mode? I don't see it in the -h output.

AFAIK variadic record initialization and peeking input is at least missing. Otherwise it should work more or less in trunk (again AFAIK⦆.

Regards,
Sven

Reply by email

Marco van de Voort
to Mark Morgan Lloyd: One useful thing might be to create a test case for each extension as you find that FPC…

In our previous episode, Mark Morgan Lloyd said:

Show quoted text 5 lines
I see from your reference that the compiler extends ANSI/ISO Pascal, but there's no indication of whether, when it was written, it was based on Jensen & Wirth or the somewhat later ISO standard. Was it written from scratch, or was it initially based on something like the P6 compiler which I believe was on some DEC systems?

The page he referenced lists extensions to both standard and extended pascal. So it seems it is an extended pascal compiler.

** Anybody: what's the state of the -Miso mode? I don't see it in the -h output.

Getting fairly close for standard pascal, no extended pascal.

Reply by email

Mark Morgan Lloyd
to Marco van de Voort
Marco van de Voort wrote 9 lines
In our previous episode, Mark Morgan Lloyd said: > I see from your reference that the compiler extends ANSI/ISO Pascal, but > there's no indication of whether, when it was written, it was based on > Jensen & Wirth or the somewhat later ISO standard. Was it written from > scratch, or was it initially based on something like the P6 compiler > which I believe was on some DEC systems? The page he referenced lists extensions to both standard and extended pascal. So it seems it is an extended pascal compiler.

Yes, but extended from /what/? Not having- as a particular example- P6 documentation, that list could describe something like the extensions that P6 has relative to ISO plus a set of extensions on top of P6.

> ** Anybody: what's the state of the -Miso mode? I don't see it in the -h > output. Getting fairly close for standard pascal, no extended pascal.

In that case somebody ought to check that it appears in -h output.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marco van de Voort
to Mark Morgan Lloyd

In our previous episode, Mark Morgan Lloyd said:

Show quoted text 7 lines
>> scratch, or was it initially based on something like the P6 compiler >> which I believe was on some DEC systems? > > The page he referenced lists extensions to both standard and extended > pascal. So it seems it is an extended pascal compiler. Yes, but extended from /what/?

ISO Pascal 10206:1991, I see schemata in that list. That's a major extended pascal feature.

Reply by email