Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Clem cole
FWIW if you get a hold of K’s “SW tools in Pascal” I think I remember that 
they created a small portable IO library. That is described in a chapter or the 
appendix I forget which.  But the library was ported and tested on VMS.  If you 
switch your IO to it then you can (in theory) — isolate the VMSisms in one 
place.  

Further if you just stare at the library sources it should give you a hint at 
what’s different between most implementations.  If you google around the 
sources for same is generally available.

Also Johnny is spot on.   IO was always the weak link and source of the most 
frustration.  Next was how external libraries were supported. As I said before 
the unit idea became persuasive but the syntax like IO varies. As Johnny also 
warned, and ad you just learned you need to be real careful of data types too 
since different implementations used similar or the same name for some routines 
but the types and parameters were all over the map.  This is why Brian and Dave 
chose to hide the IO in a private library that could be rewritten on a per 
system basis. 



> On Feb 8, 2018, at 5:38 PM, Dan Gahlinger <dgahl...@hotmail.com> wrote:
> 
> yes I'm reading it, and making some progress.
> I have a program that can read a file and display the contents to screen.
> 
> this is going to be quite a learning curve. but fun!
> 
> thanks guys!
> 
> Dan.
>  
> From: Simh <simh-boun...@trailing-edge.com> on behalf of Johnny Billquist 
> <b...@softjar.se>
> Sent: February 8, 2018 5:33 PM
> To: simh@trailing-edge.com
> Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
> pascal?
>  
> Like I said, you cannot just replace "assign" with "open". The number, 
> types, and exact arguments are not the same between assign in 
> Turbo-Pascal and open in VMS Pascal. You need to read the manual!
> 
>Johnny
> 
> On 2018-02-08 21:18, Dan Gahlinger wrote:
> > So I tried this but the output file is empty. first.txt contains "text' 
> > and second.txt contains "not test":
> > 
> > Program fcomp(input,output);
> > var
> >f, g, h : text;
> >s, t, u : varying [255] of char;
> >c, d : char;
> >i : integer;
> > begin
> >s := 'first.txt';
> >t := 'second.txt';
> >u := 'output.txt';
> >i := 0;
> >open(f,s,old);
> >open(g,t,old);
> >open(h,u,new);
> >while (not(eof(f))) do
> >  begin
> >read(f,c);
> >read(g,d);
> >i := i + 1;
> >if (c <> d) then
> >  writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
> >  end;
> >close(f);
> >close(g);
> >close(h);
> > end.
> > 
> > ----
> > *From:* Clem Cole <cl...@ccc.com>
> > *Sent:* February 8, 2018 12:44 PM
> > *To:* Dan Gahlinger
> > *Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
> > *Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal 
> > to vax pascal?
> > Yup - traditional Pascal (lack of) portability due to the report having 
> > been silent.   Associating files with file descriptors could never be 
> > agreed so ISO never defined how to do.  Every OS does it differently.  
> > Since Wirth was silent on it, if they picked one scheme over another the 
> > Pascal committee was favoring that implementation [Kernighan may have 
> > even pointed this out in his paper they wrote after writing the software 
> > tools in Pascal - Why Pascal is Not My Favorite Programming Language 
> > <http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language>
> >  ].**
> > 
> > Go google the two document I mentioned previously and it should be a 
> > fairly simply change.  Look up file I/O and then read how VMS 
> > implemented the association of  name.
> > 
> > I'm now going by memory, but a number of Pascal's did that in the 
> > reset() function.   A number created a new function as Turbo did 
> > (assign() in this case, but I think open() was used by a couple of other 
> > Pascals. I think a couple of other pass it in via the Program function 
> > and style other that supported separate libraries (usually called units) 
> > did it other ways still.
> > 
> > For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style 
> > party - in those days HP in particular was Basic happy and Tek was 
> > mostly Pascal.   We counted over 25 different incompatible 'HP Basic' 
> > implementations, and over 10 different Tek Pascal

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Dan Gahlinger
yes I'm reading it, and making some progress.
I have a program that can read a file and display the contents to screen.

this is going to be quite a learning curve. but fun!

thanks guys!

Dan.

From: Simh <simh-boun...@trailing-edge.com> on behalf of Johnny Billquist 
<b...@softjar.se>
Sent: February 8, 2018 5:33 PM
To: simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Like I said, you cannot just replace "assign" with "open". The number,
types, and exact arguments are not the same between assign in
Turbo-Pascal and open in VMS Pascal. You need to read the manual!

   Johnny

On 2018-02-08 21:18, Dan Gahlinger wrote:
> So I tried this but the output file is empty. first.txt contains "text'
> and second.txt contains "not test":
>
> Program fcomp(input,output);
> var
>f, g, h : text;
>s, t, u : varying [255] of char;
>c, d : char;
>i : integer;
> begin
>s := 'first.txt';
>t := 'second.txt';
>u := 'output.txt';
>i := 0;
>open(f,s,old);
>open(g,t,old);
>open(h,u,new);
>while (not(eof(f))) do
>  begin
>read(f,c);
>read(g,d);
>i := i + 1;
>if (c <> d) then
>  writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
>  end;
>close(f);
>close(g);
>close(h);
> end.
>
> 
> *From:* Clem Cole <cl...@ccc.com>
> *Sent:* February 8, 2018 12:44 PM
> *To:* Dan Gahlinger
> *Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
> *Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal
> to vax pascal?
> Yup - traditional Pascal (lack of) portability due to the report having
> been silent.   Associating files with file descriptors could never be
> agreed so ISO never defined how to do.  Every OS does it differently.
> Since Wirth was silent on it, if they picked one scheme over another the
> Pascal committee was favoring that implementation [Kernighan may have
> even pointed this out in his paper they wrote after writing the software
> tools in Pascal - Why Pascal is Not My Favorite Programming Language
> <http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language>
>  ].**
>
> Go google the two document I mentioned previously and it should be a
> fairly simply change.  Look up file I/O and then read how VMS
> implemented the association of  name.
>
> I'm now going by memory, but a number of Pascal's did that in the
> reset() function.   A number created a new function as Turbo did
> (assign() in this case, but I think open() was used by a couple of other
> Pascals. I think a couple of other pass it in via the Program function
> and style other that supported separate libraries (usually called units)
> did it other ways still.
>
> For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style
> party - in those days HP in particular was Basic happy and Tek was
> mostly Pascal.   We counted over 25 different incompatible 'HP Basic'
> implementations, and over 10 different Tek Pascals.
>
> These are just the sorts of things you need the Turbo Pascal manual in
> one had if that is were you are coming from and in this case the VMS
> Pascal manual in the other.  Look up assign() in the first and the read
> how perform the same action in the other.
>
> Good Luck,
> Clem
>
> ** IMHO: This is a good example of where C 'beat' Pascal - the I/O was
> defined by UNIX and when it came time to create a standard, C mostly
> kept the UNIX semantics and was able to keep many/most of the OS-ism
> from other systems out.
> ᐧ
>
> On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger <dgahl...@hotmail.com
> <mailto:dgahl...@hotmail.com>> wrote:
>
> so here you go, a simple file compare I wrote using "freepascal"
> (freepascal.org <http://freepascal.org>) and I've done what I can to
> convert it to vms pascal
> but it doesn't compile.
>
> code:
> Program fcomp(input,output);
> var
>f, g, h : text;
>s, t, u : varying [255] of char;
>c, d : char;
>i : integer;
> begin
>s := 'first.txt';
>t := 'second.txt';
>u := 'output.txt';
>i := 0;
>assign(f,s);
>reset(f);
>assign(g,t);
>reset(g);
>assign(h,u);
>rewrite(h);
>while (not(eof(f))) do
>  begin
>read(f,c);
>read(g,d);
>i := i + 1;
>if (c <> d) then
>  

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Johnny Billquist
Like I said, you cannot just replace "assign" with "open". The number, 
types, and exact arguments are not the same between assign in 
Turbo-Pascal and open in VMS Pascal. You need to read the manual!


  Johnny

On 2018-02-08 21:18, Dan Gahlinger wrote:
So I tried this but the output file is empty. first.txt contains "text' 
and second.txt contains "not test":


Program fcomp(input,output);
var
   f, g, h : text;
   s, t, u : varying [255] of char;
   c, d : char;
   i : integer;
begin
   s := 'first.txt';
   t := 'second.txt';
   u := 'output.txt';
   i := 0;
   open(f,s,old);
   open(g,t,old);
   open(h,u,new);
   while (not(eof(f))) do
     begin
   read(f,c);
   read(g,d);
   i := i + 1;
   if (c <> d) then
     writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
     end;
   close(f);
   close(g);
   close(h);
end.


*From:* Clem Cole <cl...@ccc.com>
*Sent:* February 8, 2018 12:44 PM
*To:* Dan Gahlinger
*Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
*Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal 
to vax pascal?
Yup - traditional Pascal (lack of) portability due to the report having 
been silent.   Associating files with file descriptors could never be 
agreed so ISO never defined how to do.  Every OS does it differently.  
Since Wirth was silent on it, if they picked one scheme over another the 
Pascal committee was favoring that implementation [Kernighan may have 
even pointed this out in his paper they wrote after writing the software 
tools in Pascal - Why Pascal is Not My Favorite Programming Language 
<http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language> ].**


Go google the two document I mentioned previously and it should be a 
fairly simply change.  Look up file I/O and then read how VMS 
implemented the association of  name.


I'm now going by memory, but a number of Pascal's did that in the 
reset() function.   A number created a new function as Turbo did 
(assign() in this case, but I think open() was used by a couple of other 
Pascals. I think a couple of other pass it in via the Program function 
and style other that supported separate libraries (usually called units) 
did it other ways still.


For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style 
party - in those days HP in particular was Basic happy and Tek was 
mostly Pascal.   We counted over 25 different incompatible 'HP Basic' 
implementations, and over 10 different Tek Pascals.


These are just the sorts of things you need the Turbo Pascal manual in 
one had if that is were you are coming from and in this case the VMS 
Pascal manual in the other.  Look up assign() in the first and the read 
how perform the same action in the other.


Good Luck,
Clem

** IMHO: This is a good example of where C 'beat' Pascal - the I/O was 
defined by UNIX and when it came time to create a standard, C mostly 
kept the UNIX semantics and was able to keep many/most of the OS-ism 
from other systems out.

ᐧ

On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger <dgahl...@hotmail.com 
<mailto:dgahl...@hotmail.com>> wrote:


so here you go, a simple file compare I wrote using "freepascal"
(freepascal.org <http://freepascal.org>) and I've done what I can to
convert it to vms pascal
but it doesn't compile.

code:
Program fcomp(input,output);
var
   f, g, h : text;
   s, t, u : varying [255] of char;
   c, d : char;
   i : integer;
begin
   s := 'first.txt';
   t := 'second.txt';
   u := 'output.txt';
   i := 0;
   assign(f,s);
   reset(f);
   assign(g,t);
   reset(g);
   assign(h,u);
   rewrite(h);
   while (not(eof(f))) do
     begin
   read(f,c);
   read(g,d);
   i := i + 1;
   if (c <> d) then
     writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
     end;
   close(f);
   close(g);
   close(h);
end.

errors:
  pas fcomp.pas
00016  0  1   assign(f,s);
   1
%PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
%PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic


*From:* Clem Cole <cl...@ccc.com <mailto:cl...@ccc.com>>
*Sent:* February 8, 2018 10:58 AM
*To:* Dan Gahlinger
*Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
<mailto:simh@trailing-edge.com>
*Subject:* Re: [Simh] anyone know how to convert/translate turbo
pascal to vax pascal?
Dan,

As others have said something smells wrong here.  It's true the
original '71 report from Wirth did not defined I/O and '72 revised
report only def

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Clem Cole
I'm at the airport so I do not have a manual -- again please, please
download

On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger  wrote:

>
>
>   f, g, h : text;
>

​I think the VMS syntax is something like...



f : FILE OF TEXT;

  then later

OPEN( File_Variable := f,

File_Name := *’* sample.dat*’* ,

History := OLD,

Organization := Sequential,

Access_Method := Direct; );



ᐧ
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Dan Gahlinger
So I tried this but the output file is empty. first.txt contains "text' and 
second.txt contains "not test":

Program fcomp(input,output);
var
  f, g, h : text;
  s, t, u : varying [255] of char;
  c, d : char;
  i : integer;
begin
  s := 'first.txt';
  t := 'second.txt';
  u := 'output.txt';
  i := 0;
  open(f,s,old);
  open(g,t,old);
  open(h,u,new);
  while (not(eof(f))) do
begin
  read(f,c);
  read(g,d);
  i := i + 1;
  if (c <> d) then
writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
end;
  close(f);
  close(g);
  close(h);
end.


From: Clem Cole <cl...@ccc.com>
Sent: February 8, 2018 12:44 PM
To: Dan Gahlinger
Cc: Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Yup - traditional Pascal (lack of) portability due to the report having been 
silent.   Associating files with file descriptors could never be agreed so ISO 
never defined how to do.  Every OS does it differently.  Since Wirth was silent 
on it, if they picked one scheme over another the Pascal committee was favoring 
that implementation [Kernighan may have even pointed this out in his paper they 
wrote after writing the software tools in Pascal - Why Pascal is Not My 
Favorite Programming 
Language<http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language>
 ].**

Go google the two document I mentioned previously and it should be a fairly 
simply change.  Look up file I/O and then read how VMS implemented the 
association of  name.

I'm now going by memory, but a number of Pascal's did that in the reset() 
function.   A number created a new function as Turbo did (assign() in this 
case, but I think open() was used by a couple of other Pascals. I think a 
couple of other pass it in via the Program function and style other that 
supported separate libraries (usually called units) did it other ways still.

For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style party - 
in those days HP in particular was Basic happy and Tek was mostly Pascal.   We 
counted over 25 different incompatible 'HP Basic' implementations, and over 10 
different Tek Pascals.

These are just the sorts of things you need the Turbo Pascal manual in one had 
if that is were you are coming from and in this case the VMS Pascal manual in 
the other.  Look up assign() in the first and the read how perform the same 
action in the other.

Good Luck,
Clem

** IMHO: This is a good example of where C 'beat' Pascal - the I/O was defined 
by UNIX and when it came time to create a standard, C mostly kept the UNIX 
semantics and was able to keep many/most of the OS-ism from other systems out.
[https://mailfoogae.appspot.com/t?sender=aY2xlbWNAY2NjLmNvbQ%3D%3D=zerocontent=04606809-a8e8-441d-a498-316c887d23a1]ᐧ

On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger 
<dgahl...@hotmail.com<mailto:dgahl...@hotmail.com>> wrote:
so here you go, a simple file compare I wrote using "freepascal" 
(freepascal.org<http://freepascal.org>) and I've done what I can to convert it 
to vms pascal
but it doesn't compile.

code:
Program fcomp(input,output);
var
  f, g, h : text;
  s, t, u : varying [255] of char;
  c, d : char;
  i : integer;
begin
  s := 'first.txt';
  t := 'second.txt';
  u := 'output.txt';
  i := 0;
  assign(f,s);
  reset(f);
  assign(g,t);
  reset(g);
  assign(h,u);
  rewrite(h);
  while (not(eof(f))) do
begin
  read(f,c);
  read(g,d);
  i := i + 1;
  if (c <> d) then
writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
end;
  close(f);
  close(g);
  close(h);
end.

errors:
 pas fcomp.pas
00016  0  1   assign(f,s);
  1
%PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
%PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic


From: Clem Cole <cl...@ccc.com<mailto:cl...@ccc.com>>
Sent: February 8, 2018 10:58 AM
To: Dan Gahlinger
Cc: Gary Lee Phillips; Tim Shoppa; 
simh@trailing-edge.com<mailto:simh@trailing-edge.com>
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Dan,

As others have said something smells wrong here.  It's true the original '71 
report from Wirth did not defined I/O and '72 revised report only defined 
write.  By the time of the Jensen & Wirth book from Springer-Verlag in the 
mid-late '70s writeln is there.  And by the time of the first standard efforts 
@ IEEE and ANSI it very much in the language.  I do have an old copy 
ANSI/IEEE770X3.97-1983 "American National Standard Pascal Computer Programming 
Language" which on page 93 (Section 6.9.3) defines the required standard Pascal 
function writeln:
6.9.4 The Procedure Writeln.
The syntax of the parameter list of writeln shall be:

writeln-parameter-l

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Ken Cornetet
All this talk about FORTRAN and criticisms of Pascal brought back memories of  
“Real Programmers Don’t Use Pascal”

I’d imagine all of you old timers around here have read it, but you younger 
folk may not be familiar with it. If you’ve never read this gem, go do so now. 
http://www.usm.uni-muenchen.de/~hoffmann/roff/tmp/rpdup.pdf

After you finish that, google Mel and the Royal McBee.

From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Clem Cole
Sent: Thursday, February 8, 2018 12:44 PM
To: Dan Gahlinger <dgahl...@hotmail.com>
Cc: Gary Lee Phillips <tivo.ov...@gmail.com>; simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Yup - traditional Pascal (lack of) portability due to the report having been 
silent.   Associating files with file descriptors could never be agreed so ISO 
never defined how to do.  Every OS does it differently.  Since Wirth was silent 
on it, if they picked one scheme over another the Pascal committee was favoring 
that implementation [Kernighan may have even pointed this out in his paper they 
wrote after writing the software tools in Pascal - Why Pascal is Not My 
Favorite Programming 
Language<http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language>
 ].**

Go google the two document I mentioned previously and it should be a fairly 
simply change.  Look up file I/O and then read how VMS implemented the 
association of  name.

I'm now going by memory, but a number of Pascal's did that in the reset() 
function.   A number created a new function as Turbo did (assign() in this 
case, but I think open() was used by a couple of other Pascals. I think a 
couple of other pass it in via the Program function and style other that 
supported separate libraries (usually called units) did it other ways still.

For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style party - 
in those days HP in particular was Basic happy and Tek was mostly Pascal.   We 
counted over 25 different incompatible 'HP Basic' implementations, and over 10 
different Tek Pascals.

These are just the sorts of things you need the Turbo Pascal manual in one had 
if that is were you are coming from and in this case the VMS Pascal manual in 
the other.  Look up assign() in the first and the read how perform the same 
action in the other.

Good Luck,
Clem

** IMHO: This is a good example of where C 'beat' Pascal - the I/O was defined 
by UNIX and when it came time to create a standard, C mostly kept the UNIX 
semantics and was able to keep many/most of the OS-ism from other systems out.
[https://mailfoogae.appspot.com/t?sender=aY2xlbWNAY2NjLmNvbQ%3D%3D=zerocontent=04606809-a8e8-441d-a498-316c887d23a1]ᐧ

On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger 
<dgahl...@hotmail.com<mailto:dgahl...@hotmail.com>> wrote:
so here you go, a simple file compare I wrote using "freepascal" 
(freepascal.org<http://freepascal.org>) and I've done what I can to convert it 
to vms pascal
but it doesn't compile.

code:
Program fcomp(input,output);
var
  f, g, h : text;
  s, t, u : varying [255] of char;
  c, d : char;
  i : integer;
begin
  s := 'first.txt';
  t := 'second.txt';
  u := 'output.txt';
  i := 0;
  assign(f,s);
  reset(f);
  assign(g,t);
  reset(g);
  assign(h,u);
  rewrite(h);
  while (not(eof(f))) do
begin
  read(f,c);
  read(g,d);
  i := i + 1;
  if (c <> d) then
writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
end;
  close(f);
  close(g);
  close(h);
end.

errors:
 pas fcomp.pas
00016  0  1   assign(f,s);
  1
%PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
%PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic


From: Clem Cole <cl...@ccc.com<mailto:cl...@ccc.com>>
Sent: February 8, 2018 10:58 AM
To: Dan Gahlinger
Cc: Gary Lee Phillips; Tim Shoppa; 
simh@trailing-edge.com<mailto:simh@trailing-edge.com>
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Dan,

As others have said something smells wrong here.  It's true the original '71 
report from Wirth did not defined I/O and '72 revised report only defined 
write.  By the time of the Jensen & Wirth book from Springer-Verlag in the 
mid-late '70s writeln is there.  And by the time of the first standard efforts 
@ IEEE and ANSI it very much in the language.  I do have an old copy 
ANSI/IEEE770X3.97-1983 "American National Standard Pascal Computer Programming 
Language" which on page 93 (Section 6.9.3) defines the required standard Pascal 
function writeln:
6.9.4 The Procedure Writeln.
The syntax of the parameter list of writeln shall be:

writeln-parameter-list = [ "(" ( file-variable | write-parameter )
  | "," write-parameter | ")" ] .

Writeln

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Clem Cole
Yup - traditional Pascal (lack of) portability due to the report having
been silent.   Associating files with file descriptors could never be
agreed so ISO never defined how to do.  Every OS does it differently.
Since Wirth was silent on it, if they picked one scheme over another the
Pascal committee was favoring that implementation [Kernighan may have even
pointed this out in his paper they wrote after writing the software tools
in Pascal - Why Pascal is Not My Favorite Programming Language
<http://wiki.lazarus.freepascal.org/Why_Pascal_is_Not_My_Favorite_Programming_Language>
 ].**

Go google the two document I mentioned previously and it should be a fairly
simply change.  Look up file I/O and then read how VMS implemented the
association of  name.

I'm now going by memory, but a number of Pascal's did that in the reset()
function.   A number created a new function as Turbo did (assign() in this
case, but I think open() was used by a couple of other Pascals. I think a
couple of other pass it in via the Program function and style other that
supported separate libraries (usually called units) did it other ways still.

For grins, in the late 1970s at an HP/Tektronix  'Hatfield/McCoy' style
party - in those days HP in particular was Basic happy and Tek was mostly
Pascal.   We counted over 25 different incompatible 'HP Basic'
implementations, and over 10 different Tek Pascals.

These are just the sorts of things you need the Turbo Pascal manual in one
had if that is were you are coming from and in this case the VMS Pascal
manual in the other.  Look up assign() in the first and the read how
perform the same action in the other.

Good Luck,
Clem

** IMHO: This is a good example of where C 'beat' Pascal - the I/O was
defined by UNIX and when it came time to create a standard, C mostly kept
the UNIX semantics and was able to keep many/most of the OS-ism from other
systems out.
ᐧ

On Thu, Feb 8, 2018 at 12:21 PM, Dan Gahlinger <dgahl...@hotmail.com> wrote:

> so here you go, a simple file compare I wrote using "freepascal" (
> freepascal.org) and I've done what I can to convert it to vms pascal
> but it doesn't compile.
>
> code:
> Program fcomp(input,output);
> var
>   f, g, h : text;
>   s, t, u : varying [255] of char;
>   c, d : char;
>   i : integer;
> begin
>   s := 'first.txt';
>   t := 'second.txt';
>   u := 'output.txt';
>   i := 0;
>   assign(f,s);
>   reset(f);
>   assign(g,t);
>   reset(g);
>   assign(h,u);
>   rewrite(h);
>   while (not(eof(f))) do
> begin
>   read(f,c);
>   read(g,d);
>   i := i + 1;
>   if (c <> d) then
> writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
> end;
>   close(f);
>   close(g);
>   close(h);
> end.
>
> errors:
>  pas fcomp.pas
> 00016  0  1   assign(f,s);
>   1
> %PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
> at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
> %PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic
>
> --
> *From:* Clem Cole <cl...@ccc.com>
> *Sent:* February 8, 2018 10:58 AM
> *To:* Dan Gahlinger
> *Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
> *Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal
> to vax pascal?
>
> Dan,
>
> As others have said something smells wrong here.  It's true the original
> '71 report from Wirth did not defined I/O and '72 revised report only
> defined write.  By the time of the Jensen & Wirth book from Springer-Verlag
> in the mid-late '70s writeln is there.  And by the time of the first
> standard efforts @ IEEE and ANSI it very much in the language.  I do have
> an old copy ANSI/IEEE770X3.97-1983 "American National Standard Pascal
> Computer Programming Language" which on page 93 (Section 6.9.3) defines the
> required standard Pascal function writeln:
>
> *6.9.4 The Procedure Writeln.*
>
> The syntax of the parameter list of writeln shall be:
>
> writeln-parameter-list = [ "(" ( file-variable | write-parameter )
>   | "," write-parameter | ")" ] .
>
> *Writeln* shall only be applied to textfiles. If the file-variable or the
> writeln-parameter-list is omitted, the procedure shall be applied to the
> required textfile output.
>
>
> From a quick search on the HP web site (http://h41379.www4.hpe.com/
> commercial/pascal/pascal_index.html ) I found reference to the SPD and
> the site says:  :
>
> HP Pascal (formerly known as Compaq Pascal and DEC Pascal) runs on OpenVMS
> for VAX systems, OpenVMS for AlphaServer systems, and OpenVMS for Integrity
> servers. With HP Pascal, your source code investment is not only protected,
> it is extended.
>
> HP Pasca

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Johnny Billquist

Noone seem to have brought this up, so I guess I'll have to.

Standard Pascal is pretty straight forward, and usually compiles easily 
from one compiler to the next.
However, Pascal was notorious for omitting how to do I/O to anything but 
the terminal. The standard does not cover this, and every compiler had 
to come up with some extension for it. And thus, of course any code that 
does anything related to files, will, by definition, be non-portable.


In this case, you have the assign() function which is used to associate 
actual filenames with handles inside Pascal. In VMS Pascal, you do not 
use a function called assign() for this. Check the VMS Pascal manual, 
but I suspect it might be called open() maybe? And of course have 
different order and types of arguments, so you cannot just change the name.


File I/O was *always* the first thing brought up whenever talking about 
the limitations and shortcomings of the Pascal standard.


  Johnny

On 2018-02-08 18:21, Dan Gahlinger wrote:
so here you go, a simple file compare I wrote using "freepascal" 
(freepascal.org) and I've done what I can to convert it to vms pascal

but it doesn't compile.

code:
Program fcomp(input,output);
var
   f, g, h : text;
   s, t, u : varying [255] of char;
   c, d : char;
   i : integer;
begin
   s := 'first.txt';
   t := 'second.txt';
   u := 'output.txt';
   i := 0;
   assign(f,s);
   reset(f);
   assign(g,t);
   reset(g);
   assign(h,u);
   rewrite(h);
   while (not(eof(f))) do
     begin
   read(f,c);
   read(g,d);
   i := i + 1;
   if (c <> d) then
     writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
     end;
   close(f);
   close(g);
   close(h);
end.

errors:
  pas fcomp.pas
00016  0  1   assign(f,s);
   1
%PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
%PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic


*From:* Clem Cole <cl...@ccc.com>
*Sent:* February 8, 2018 10:58 AM
*To:* Dan Gahlinger
*Cc:* Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
*Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal 
to vax pascal?

Dan,

As others have said something smells wrong here.  It's true the original 
'71 report from Wirth did not defined I/O and '72 revised report only 
defined write.  By the time of the Jensen & Wirth book from 
Springer-Verlag in the mid-late '70s writeln is there.  And by the time 
of the first standard efforts @ IEEE and ANSI it very much in the 
language. I do have an old copy ANSI/IEEE770X3.97-1983 "American 
National Standard Pascal Computer Programming Language" which on page 93 
(Section 6.9.3) defines the required standard Pascal function writeln:


*6.9.4 The Procedure Writeln.*

The syntax of the parameter list of writeln shall be:

writeln-parameter-list = [ "(" ( file-variable |
write-parameter )
                               | "," write-parameter | ")" ] .

*Writeln*shall only be applied to textfiles. If the
file-variable or the writeln-parameter-list is omitted, the
procedure shall be applied to the required textfile output.


 From a quick search on the HP web site 
(http://h41379.www4.hpe.com/commercial/pascal/pascal_index.html )I found 
reference to the SPD and the site says: :


HP Pascal (formerly known as Compaq Pascal and DEC Pascal) runs on
OpenVMS for VAX systems, OpenVMS for AlphaServer systems, and
OpenVMS for Integrity servers. With HP Pascal, your source code
investment is not only protected, it is extended.

HP Pascal supports code compatible with either level of the ISO
specification, meets Federal Information Processing Standard
Publications (FIPS-109) requirements, and supports many features
from the Extended Pascal Standard. HP Pascal has a solid reputation
as a robust, production-quality, high-performance compiler. It is a
full compiler, not an interpretive one. Tightly integrated wit

While I do not have FIPS 109 on my system, FIPS was based on 
ANSI/IEEE770X3.97, and I do have a copy of the an old DEC pascal manual 
so I'm 100% sure writeln is there.  I also believe that Turbo Pascal was 
developed after the ANSI/IEEE770X3.97 was published so the Turbo 
extension to writeln and any VMS ones should be able to puzzled out.


Here is a pointer to Pascal for OpenVMS - User Manual Order Number: 
AA-PXSND-TK 
<https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04619822>   This 
may give you hints.


That said, I have a PDF of the VMS Pascal Reference, but lord knows 
where it came from; probably my time at DEC.   I have to believe its on 
bitsavers or the like.   But when I look on page 9-67, Section 9.8.26 
defines the WRITELN procedure as defined in the standard with the one 

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Dan Gahlinger
so here you go, a simple file compare I wrote using "freepascal" 
(freepascal.org) and I've done what I can to convert it to vms pascal
but it doesn't compile.

code:
Program fcomp(input,output);
var
  f, g, h : text;
  s, t, u : varying [255] of char;
  c, d : char;
  i : integer;
begin
  s := 'first.txt';
  t := 'second.txt';
  u := 'output.txt';
  i := 0;
  assign(f,s);
  reset(f);
  assign(g,t);
  reset(g);
  assign(h,u);
  rewrite(h);
  while (not(eof(f))) do
begin
  read(f,c);
  read(g,d);
  i := i + 1;
  if (c <> d) then
writeln(h,i,' = 1:[',c,']/',ord(c),' 2:[',d,']/',ord(d));
end;
  close(f);
  close(g);
  close(h);
end.

errors:
 pas fcomp.pas
00016  0  1   assign(f,s);
  1
%PASCAL-E-UNDECLID, (1) Undeclared identifier ASSIGN
at line number 16 in file DUA1:[DAN]FCOMP.PAS;4
%PASCAL-E-ENDDIAGS, PASCAL completed with 1 diagnostic


From: Clem Cole <cl...@ccc.com>
Sent: February 8, 2018 10:58 AM
To: Dan Gahlinger
Cc: Gary Lee Phillips; Tim Shoppa; simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Dan,

As others have said something smells wrong here.  It's true the original '71 
report from Wirth did not defined I/O and '72 revised report only defined 
write.  By the time of the Jensen & Wirth book from Springer-Verlag in the 
mid-late '70s writeln is there.  And by the time of the first standard efforts 
@ IEEE and ANSI it very much in the language.  I do have an old copy 
ANSI/IEEE770X3.97-1983 "American National Standard Pascal Computer Programming 
Language" which on page 93 (Section 6.9.3) defines the required standard Pascal 
function writeln:
6.9.4 The Procedure Writeln.
The syntax of the parameter list of writeln shall be:

writeln-parameter-list = [ "(" ( file-variable | write-parameter )
  | "," write-parameter | ")" ] .

Writeln shall only be applied to textfiles. If the file-variable or the 
writeln-parameter-list is omitted, the procedure shall be applied to the 
required textfile output.

From a quick search on the HP web site 
(http://h41379.www4.hpe.com/commercial/pascal/pascal_index.html ) I found 
reference to the SPD and the site says:  :

HP Pascal (formerly known as Compaq Pascal and DEC Pascal) runs on OpenVMS for 
VAX systems, OpenVMS for AlphaServer systems, and OpenVMS for Integrity 
servers. With HP Pascal, your source code investment is not only protected, it 
is extended.

HP Pascal supports code compatible with either level of the ISO specification, 
meets Federal Information Processing Standard Publications (FIPS-109) 
requirements, and supports many features from the Extended Pascal Standard. HP 
Pascal has a solid reputation as a robust, production-quality, high-performance 
compiler. It is a full compiler, not an interpretive one. Tightly integrated wit

While I do not have FIPS 109 on my system, FIPS was based on ANSI/IEEE770X3.97, 
and I do have a copy of the an old DEC pascal manual so I'm 100% sure writeln 
is there.  I also believe that Turbo Pascal was developed after the 
ANSI/IEEE770X3.97 was published so the Turbo extension to writeln and any VMS 
ones should be able to puzzled out.

Here is a pointer to Pascal for OpenVMS - User Manual Order Number: 
AA-PXSND-TK<https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04619822>
   This may give you hints.

That said, I have a PDF of the VMS Pascal Reference, but lord knows where it 
came from; probably my time at DEC.   I have to believe its on bitsavers or the 
like.   But when I look on page 9-67, Section 9.8.26 defines the WRITELN 
procedure as defined in the standard with the one DEC extension of supporting 
that last optional parameter to be: [, ERROR := error-recovery] where 
error-recovery  is defined as the action to be taken when an error occurs.

 As other have said maybe its something silly from file format conversion like 
 processing as VMS record oriented I/O is different than DOS/Windows.  
But I suspect you are running into a difference in how I/O is declared and 
bound to files on the disk.   My experience with a number of different Pascal 
compilers 'back in the day' was this was an area for wide variation.   This is 
what I would look up in the HP/Compaq/DEC user manuals I just pointed you too.  
I suspect that the 'VMS Pascal Language' manual should help you through the DEC 
variant, so google is your friend to try find a PDF.  With that open and a 
Turbo Pascal manual I think you'll be fine (and if you cannot find a Turbo 
manual, I have to believe the freepascal.org<http://freepascal.org> docs will 
get you a long way since they claim to be 100% Turbo Pascal and Delphi 
compatible).

BTW:  One other though/place where Pascal I/O can differ is character sets, 
although I don't think it a problem because PCs and Vaxen never had 

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Clem Cole
Dan,

As others have said something smells wrong here.  It's true the original
'71 report from Wirth did not defined I/O and '72 revised report only
defined write.  By the time of the Jensen & Wirth book from Springer-Verlag
in the mid-late '70s writeln is there.  And by the time of the first
standard efforts @ IEEE and ANSI it very much in the language.  I do have
an old copy ANSI/IEEE770X3.97-1983 "American National Standard Pascal
Computer Programming Language" which on page 93 (Section 6.9.3) defines the
required standard Pascal function writeln:

*6.9.4 The Procedure Writeln.*

The syntax of the parameter list of writeln shall be:

writeln-parameter-list = [ "(" ( file-variable | write-parameter )
  | "," write-parameter | ")" ] .

*Writeln* shall only be applied to textfiles. If the file-variable or the
writeln-parameter-list is omitted, the procedure shall be applied to the
required textfile output.


>From a quick search on the HP web site (
http://h41379.www4.hpe.com/commercial/pascal/pascal_index.html ) I found
reference to the SPD and the site says:  :

HP Pascal (formerly known as Compaq Pascal and DEC Pascal) runs on OpenVMS
for VAX systems, OpenVMS for AlphaServer systems, and OpenVMS for Integrity
servers. With HP Pascal, your source code investment is not only protected,
it is extended.

HP Pascal supports code compatible with either level of the ISO
specification, meets Federal Information Processing Standard Publications
(FIPS-109) requirements, and supports many features from the Extended
Pascal Standard. HP Pascal has a solid reputation as a robust,
production-quality, high-performance compiler. It is a full compiler, not
an interpretive one. Tightly integrated wit

While I do not have FIPS 109 on my system, FIPS was based on ANSI/IEEE770X3.97,
and I do have a copy of the an old DEC pascal manual so I'm 100% sure
writeln is there.  I also believe that Turbo Pascal was developed
after the ANSI/IEEE770X3.97
was published so the Turbo extension to writeln and any VMS ones should be
able to puzzled out.

Here is a pointer to Pascal for OpenVMS - User Manual Order Number:
AA-PXSND-TK

 This may give you hints.

That said, I have a PDF of the VMS Pascal Reference, but lord knows where
it came from; probably my time at DEC.   I have to believe its on bitsavers
or the like.   But when I look on page 9-67, Section 9.8.26 defines the
WRITELN procedure as defined in the standard with the one DEC extension of
supporting that last optional parameter to be: [, ERROR := error-recovery]
where error-recovery  is defined as the action to be taken when an error
occurs.

 As other have said maybe its something silly from file format conversion
like  processing as VMS record oriented I/O is different than
DOS/Windows.  But I suspect you are running into a difference in how I/O is
declared and bound to files on the disk.   My experience with a number of
different Pascal compilers 'back in the day' was this was an area for wide
variation.   This is what I would look up in the HP/Compaq/DEC user manuals
I just pointed you too.  I suspect that the 'VMS Pascal Language' manual
should help you through the DEC variant, so google is your friend to try
find a PDF.  With that open and a Turbo Pascal manual I think you'll be
fine (and if you cannot find a Turbo manual, I have to believe the
freepascal.org docs will get you a long way since they claim to be 100%
Turbo Pascal and Delphi compatible).

BTW:  One other though/place where Pascal I/O can differ is character sets,
although I don't think it a problem because PCs and Vaxen never had this
issue, if you read any the reports or "Jensen and Wirth" you will notice
that Pascal was defined for a 6-bit byte on a CDC-6600 system (SCOPE was
the OS IIRC).As I have said elsewhere, a 6-bit character was not
unusual on earlier systems -> today, we can thank Fred Brooks for the 8-bit
byte (Gene Amdahl wanted it to be 6 bits but Brooks kicked him out of his
office until he had something that could easily be handled by SW - *i.e*. a
power of 2, which Amdahl thought was wasteful for the HW).

Anyway, characters can be an issue when moving Pascal code because original
Pascal was defined with some CDC isms and in those days, CDC had as number
of different character sets.I note that if look at the ANSI standard
you'll noted the definition of all identifiers is just the lower case
[english] chars a-z for letters, the traditional digits 0-9 and very
limited number of special-symbols ( + - * / = < > [ ] . , : ' | ( ) ).
They do say:

The representation of any letter (upper-case or lower-case, differences of
font, *etc*.) occurring anywhere outside of a character-string (see 6.1.7)
shall be insignificant in that occurrence to the meaning of the program.

Because of the '6-bit ness' of some systems, the standard even provides for
alternative tokens to do things like square braces 

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Dan Gahlinger
that's the one, the "spiritual" successor to turbo pascal :)

From: Simh <simh-boun...@trailing-edge.com> on behalf of Pär Moberg 
<ghostdew...@gmail.com>
Sent: February 8, 2018 10:24 AM
To: Simh
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

There is a implementation of pascal called freepascal at 
freepascal.org<http://freepascal.org>
//Pär

Den 8 feb. 2018 14:45 skrev "Dan Gahlinger" 
<dgahl...@hotmail.com<mailto:dgahl...@hotmail.com>>:
Seems it was because I couldn’t figure out about needing to define output in 
the program line
Turbo pascal doesn’t use that

I’m going to test some simpler code I have and see if I can get it going and go 
from there

Get Outlook for iOS<https://aka.ms/o0ukef>

From: Simh 
<simh-boun...@trailing-edge.com<mailto:simh-boun...@trailing-edge.com>> on 
behalf of Gary Lee Phillips <tivo.ov...@gmail.com<mailto:tivo.ov...@gmail.com>>
Sent: Thursday, February 8, 2018 8:19:20 AM
To: Tim Shoppa
Cc: simh@trailing-edge.com<mailto:simh@trailing-edge.com>
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

It could, but the error message should make that clear. If the compiler rejects 
the syntax that's a different message from a linkage error.

I wrote working system code in VAX Pascal but it was back in the 80s. Some of 
my work was accepted for publication in fact. I also did some substantial work 
in Turbo Pascal at about that time. But to be honest, I haven't touched Pascal 
for years now. Even so, I do know that VMS Pascal will support the language 
standards just as it always did. The problem with writeln is likely to be 
non-standard syntax, as Turbo Pascal accepted a lot of short cuts. I suspect 
the big issues with the project in question are more likely going to be related 
to graphics.

--Gary


On Thu, Feb 8, 2018 at 7:10 AM, Tim Shoppa 
<tsho...@gmail.com<mailto:tsho...@gmail.com>> wrote:
Could the writeln issue, be a link time and not compile time? I remember having 
to specify the Pascal runtime libraries (more than one?) at link time.

Tim

> On Feb 8, 2018, at 7:51 AM, Gary Lee Phillips 
> <tivo.ov...@gmail.com<mailto:tivo.ov...@gmail.com>> wrote:
>
> VMS Pascal conforms to the language standards. So does Turbo Pascal, if the 
> code is written to standard.
>
> The problem with porting in Pascal comes when language extensions are used. 
> These are often proprietary and/or hardware specific. On OpenVMS much of the 
> extended capability depends on calling system libraries, all of which are 
> supported. Turbo Pascal was designed specifically for the IBM PC and 
> "compatible" systems, and contains a lot of proprietary extensions that will 
> not be recognized by VMS Pascal's compiler.
>
> If your code depends on graphic functions, the ones in Turbo Pascal are 
> almost entirely peculiar to that environment and will require a lot of 
> rewriting. These use custom libraries that come with the compiler, and 
> probably most can be duplicated by using OpenVMS system calls in some format. 
> Some analysis will be required to identify the hardware specific code and 
> select appropriate substitutions.
>
> As for "free pascal" there are several incompatible implementations that go 
> by the name, so I'm not sure what you have used. However, all of them pretty 
> much support the original language definition and code that stays within that 
> standard definition will work without translation. Extensions that use 
> library calls or custom units are going to be the area that requires 
> (possibly a lot of) work.
>
> The full VMS Pascal manuals are available in PDF form online and you should 
> begin there.
>
> By the way, VMS Pascal definitely supports writeln. It also has record 
> structures, etc. Those are all part of the standard language definition. We'd 
> need to see a sample of your code that doesn't work in order to figure out 
> where your problem comes from.
>
> ___
> Simh mailing list
> Simh@trailing-edge.com<mailto:Simh@trailing-edge.com>
> http://mailman.trailing-edge.com/mailman/listinfo/simh


___
Simh mailing list
Simh@trailing-edge.com<mailto:Simh@trailing-edge.com>
http://mailman.trailing-edge.com/mailman/listinfo/simh

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Pär Moberg
There is a implementation of pascal called freepascal at freepascal.org
//Pär

Den 8 feb. 2018 14:45 skrev "Dan Gahlinger" <dgahl...@hotmail.com>:

Seems it was because I couldn’t figure out about needing to define output
in the program line
Turbo pascal doesn’t use that

I’m going to test some simpler code I have and see if I can get it going
and go from there

Get Outlook for iOS <https://aka.ms/o0ukef>
--
*From:* Simh <simh-boun...@trailing-edge.com> on behalf of Gary Lee
Phillips <tivo.ov...@gmail.com>
*Sent:* Thursday, February 8, 2018 8:19:20 AM
*To:* Tim Shoppa
*Cc:* simh@trailing-edge.com
*Subject:* Re: [Simh] anyone know how to convert/translate turbo pascal to
vax pascal?

It could, but the error message should make that clear. If the compiler
rejects the syntax that's a different message from a linkage error.

I wrote working system code in VAX Pascal but it was back in the 80s. Some
of my work was accepted for publication in fact. I also did some
substantial work in Turbo Pascal at about that time. But to be honest, I
haven't touched Pascal for years now. Even so, I do know that VMS Pascal
will support the language standards just as it always did. The problem with
writeln is likely to be non-standard syntax, as Turbo Pascal accepted a lot
of short cuts. I suspect the big issues with the project in question are
more likely going to be related to graphics.

--Gary


On Thu, Feb 8, 2018 at 7:10 AM, Tim Shoppa <tsho...@gmail.com> wrote:

> Could the writeln issue, be a link time and not compile time? I remember
> having to specify the Pascal runtime libraries (more than one?) at link
> time.
>
> Tim
>
> > On Feb 8, 2018, at 7:51 AM, Gary Lee Phillips <tivo.ov...@gmail.com>
> wrote:
> >
> > VMS Pascal conforms to the language standards. So does Turbo Pascal, if
> the code is written to standard.
> >
> > The problem with porting in Pascal comes when language extensions are
> used. These are often proprietary and/or hardware specific. On OpenVMS much
> of the extended capability depends on calling system libraries, all of
> which are supported. Turbo Pascal was designed specifically for the IBM PC
> and "compatible" systems, and contains a lot of proprietary extensions that
> will not be recognized by VMS Pascal's compiler.
> >
> > If your code depends on graphic functions, the ones in Turbo Pascal are
> almost entirely peculiar to that environment and will require a lot of
> rewriting. These use custom libraries that come with the compiler, and
> probably most can be duplicated by using OpenVMS system calls in some
> format. Some analysis will be required to identify the hardware specific
> code and select appropriate substitutions.
> >
> > As for "free pascal" there are several incompatible implementations that
> go by the name, so I'm not sure what you have used. However, all of them
> pretty much support the original language definition and code that stays
> within that standard definition will work without translation. Extensions
> that use library calls or custom units are going to be the area that
> requires (possibly a lot of) work.
> >
> > The full VMS Pascal manuals are available in PDF form online and you
> should begin there.
> >
> > By the way, VMS Pascal definitely supports writeln. It also has record
> structures, etc. Those are all part of the standard language definition.
> We'd need to see a sample of your code that doesn't work in order to figure
> out where your problem comes from.
> >
> > ___
> > Simh mailing list
> > Simh@trailing-edge.com
> > http://mailman.trailing-edge.com/mailman/listinfo/simh
>


___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Dan Gahlinger
Seems it was because I couldn’t figure out about needing to define output in 
the program line
Turbo pascal doesn’t use that

I’m going to test some simpler code I have and see if I can get it going and go 
from there

Get Outlook for iOS<https://aka.ms/o0ukef>

From: Simh <simh-boun...@trailing-edge.com> on behalf of Gary Lee Phillips 
<tivo.ov...@gmail.com>
Sent: Thursday, February 8, 2018 8:19:20 AM
To: Tim Shoppa
Cc: simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

It could, but the error message should make that clear. If the compiler rejects 
the syntax that's a different message from a linkage error.

I wrote working system code in VAX Pascal but it was back in the 80s. Some of 
my work was accepted for publication in fact. I also did some substantial work 
in Turbo Pascal at about that time. But to be honest, I haven't touched Pascal 
for years now. Even so, I do know that VMS Pascal will support the language 
standards just as it always did. The problem with writeln is likely to be 
non-standard syntax, as Turbo Pascal accepted a lot of short cuts. I suspect 
the big issues with the project in question are more likely going to be related 
to graphics.

--Gary


On Thu, Feb 8, 2018 at 7:10 AM, Tim Shoppa 
<tsho...@gmail.com<mailto:tsho...@gmail.com>> wrote:
Could the writeln issue, be a link time and not compile time? I remember having 
to specify the Pascal runtime libraries (more than one?) at link time.

Tim

> On Feb 8, 2018, at 7:51 AM, Gary Lee Phillips 
> <tivo.ov...@gmail.com<mailto:tivo.ov...@gmail.com>> wrote:
>
> VMS Pascal conforms to the language standards. So does Turbo Pascal, if the 
> code is written to standard.
>
> The problem with porting in Pascal comes when language extensions are used. 
> These are often proprietary and/or hardware specific. On OpenVMS much of the 
> extended capability depends on calling system libraries, all of which are 
> supported. Turbo Pascal was designed specifically for the IBM PC and 
> "compatible" systems, and contains a lot of proprietary extensions that will 
> not be recognized by VMS Pascal's compiler.
>
> If your code depends on graphic functions, the ones in Turbo Pascal are 
> almost entirely peculiar to that environment and will require a lot of 
> rewriting. These use custom libraries that come with the compiler, and 
> probably most can be duplicated by using OpenVMS system calls in some format. 
> Some analysis will be required to identify the hardware specific code and 
> select appropriate substitutions.
>
> As for "free pascal" there are several incompatible implementations that go 
> by the name, so I'm not sure what you have used. However, all of them pretty 
> much support the original language definition and code that stays within that 
> standard definition will work without translation. Extensions that use 
> library calls or custom units are going to be the area that requires 
> (possibly a lot of) work.
>
> The full VMS Pascal manuals are available in PDF form online and you should 
> begin there.
>
> By the way, VMS Pascal definitely supports writeln. It also has record 
> structures, etc. Those are all part of the standard language definition. We'd 
> need to see a sample of your code that doesn't work in order to figure out 
> where your problem comes from.
>
> ___
> Simh mailing list
> Simh@trailing-edge.com<mailto:Simh@trailing-edge.com>
> http://mailman.trailing-edge.com/mailman/listinfo/simh

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Gary Lee Phillips
It could, but the error message should make that clear. If the compiler
rejects the syntax that's a different message from a linkage error.

I wrote working system code in VAX Pascal but it was back in the 80s. Some
of my work was accepted for publication in fact. I also did some
substantial work in Turbo Pascal at about that time. But to be honest, I
haven't touched Pascal for years now. Even so, I do know that VMS Pascal
will support the language standards just as it always did. The problem with
writeln is likely to be non-standard syntax, as Turbo Pascal accepted a lot
of short cuts. I suspect the big issues with the project in question are
more likely going to be related to graphics.

--Gary


On Thu, Feb 8, 2018 at 7:10 AM, Tim Shoppa  wrote:

> Could the writeln issue, be a link time and not compile time? I remember
> having to specify the Pascal runtime libraries (more than one?) at link
> time.
>
> Tim
>
> > On Feb 8, 2018, at 7:51 AM, Gary Lee Phillips 
> wrote:
> >
> > VMS Pascal conforms to the language standards. So does Turbo Pascal, if
> the code is written to standard.
> >
> > The problem with porting in Pascal comes when language extensions are
> used. These are often proprietary and/or hardware specific. On OpenVMS much
> of the extended capability depends on calling system libraries, all of
> which are supported. Turbo Pascal was designed specifically for the IBM PC
> and "compatible" systems, and contains a lot of proprietary extensions that
> will not be recognized by VMS Pascal's compiler.
> >
> > If your code depends on graphic functions, the ones in Turbo Pascal are
> almost entirely peculiar to that environment and will require a lot of
> rewriting. These use custom libraries that come with the compiler, and
> probably most can be duplicated by using OpenVMS system calls in some
> format. Some analysis will be required to identify the hardware specific
> code and select appropriate substitutions.
> >
> > As for "free pascal" there are several incompatible implementations that
> go by the name, so I'm not sure what you have used. However, all of them
> pretty much support the original language definition and code that stays
> within that standard definition will work without translation. Extensions
> that use library calls or custom units are going to be the area that
> requires (possibly a lot of) work.
> >
> > The full VMS Pascal manuals are available in PDF form online and you
> should begin there.
> >
> > By the way, VMS Pascal definitely supports writeln. It also has record
> structures, etc. Those are all part of the standard language definition.
> We'd need to see a sample of your code that doesn't work in order to figure
> out where your problem comes from.
> >
> > ___
> > Simh mailing list
> > Simh@trailing-edge.com
> > http://mailman.trailing-edge.com/mailman/listinfo/simh
>
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Tim Shoppa
Could the writeln issue, be a link time and not compile time? I remember having 
to specify the Pascal runtime libraries (more than one?) at link time.

Tim 

> On Feb 8, 2018, at 7:51 AM, Gary Lee Phillips  wrote:
> 
> VMS Pascal conforms to the language standards. So does Turbo Pascal, if the 
> code is written to standard.
> 
> The problem with porting in Pascal comes when language extensions are used. 
> These are often proprietary and/or hardware specific. On OpenVMS much of the 
> extended capability depends on calling system libraries, all of which are 
> supported. Turbo Pascal was designed specifically for the IBM PC and 
> "compatible" systems, and contains a lot of proprietary extensions that will 
> not be recognized by VMS Pascal's compiler.
> 
> If your code depends on graphic functions, the ones in Turbo Pascal are 
> almost entirely peculiar to that environment and will require a lot of 
> rewriting. These use custom libraries that come with the compiler, and 
> probably most can be duplicated by using OpenVMS system calls in some format. 
> Some analysis will be required to identify the hardware specific code and 
> select appropriate substitutions.
> 
> As for "free pascal" there are several incompatible implementations that go 
> by the name, so I'm not sure what you have used. However, all of them pretty 
> much support the original language definition and code that stays within that 
> standard definition will work without translation. Extensions that use 
> library calls or custom units are going to be the area that requires 
> (possibly a lot of) work.
> 
> The full VMS Pascal manuals are available in PDF form online and you should 
> begin there. 
> 
> By the way, VMS Pascal definitely supports writeln. It also has record 
> structures, etc. Those are all part of the standard language definition. We'd 
> need to see a sample of your code that doesn't work in order to figure out 
> where your problem comes from.
> 
> ___
> Simh mailing list
> Simh@trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Gary Lee Phillips
VMS Pascal conforms to the language standards. So does Turbo Pascal, if the
code is written to standard.

The problem with porting in Pascal comes when language extensions are used.
These are often proprietary and/or hardware specific. On OpenVMS much of
the extended capability depends on calling system libraries, all of which
are supported. Turbo Pascal was designed specifically for the IBM PC and
"compatible" systems, and contains a lot of proprietary extensions that
will not be recognized by VMS Pascal's compiler.

If your code depends on graphic functions, the ones in Turbo Pascal are
almost entirely peculiar to that environment and will require a lot of
rewriting. These use custom libraries that come with the compiler, and
probably most can be duplicated by using OpenVMS system calls in some
format. Some analysis will be required to identify the hardware specific
code and select appropriate substitutions.

As for "free pascal" there are several incompatible implementations that go
by the name, so I'm not sure what you have used. However, all of them
pretty much support the original language definition and code that stays
within that standard definition will work without translation. Extensions
that use library calls or custom units are going to be the area that
requires (possibly a lot of) work.

The full VMS Pascal manuals are available in PDF form online and you should
begin there.

By the way, VMS Pascal definitely supports writeln. It also has record
structures, etc. Those are all part of the standard language definition.
We'd need to see a sample of your code that doesn't work in order to figure
out where your problem comes from.
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-08 Thread Bob Eager
I'm wondering if the Pascal source has picked up spurious characters
such as ^M on its travels.

On Thu, 8 Feb 2018 06:19:06 +
Dan Gahlinger <dgahl...@hotmail.com> wrote:

> I found a hello world pascal example online for vms,
> so at least that much I can get working.
> 
> however, all the docs online are not so useful for programming itself.
> my code has input and output from the terminal and from files.
> the hello program uses: program hello(output);
> so not sure how to do in and out from the terminal.
> tried googling examples but no such luck beyond hello world.
> 
> it might be easier for me to port to vax basic, I used to be an
> expert at that, many moons ago.
> 
> Dan.
> 
> From: Simh <simh-boun...@trailing-edge.com> on behalf of Jon Elson
> <el...@pico-systems.com> Sent: February 7, 2018 9:25 PM
> To: simh@trailing-edge.com
> Subject: [Simh] anyone know how to convert/translate turbo pascal to
> vax pascal?
> 
> On 02/07/2018 05:57 PM, simh-requ...@trailing-edge.com wrote:
> > [Simh] anyone know how to convert/translate turbo pascal to
> >vax pascal?
> > Message-ID:
> >
> > <dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com>
> >
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > since I did all that work recreating "castle" from the vax to the pc
> > using turbo pascal (then free pascal)
> > I'd like to "port" it back to the vax,
> > but the vms 7.3 pascal compiler doesn't recognize "writeln"
> > and I suspect things like types and records and case statements
> > wont work either.
> >
> > anyone have any ideas?
> Umm, I just looked back at some Pascal code I had on VAX
> Pascal, and it DEFINITELY has writeln statements in it.
> This is such basic Pascal syntax, I can't imagine that did
> not work.  But, maybe you have to enable some library or
> Pascal "unit" to use those functions.
> 
> Jon
> ___
> Simh mailing list
> Simh@trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Jean-Claude Parel
Hello, Dan

I have a good knowledge on OpenVMS Pascal programming. 
Can you provide us with an example of source code that generates writeln 
errors ?

Cordialement/Regards



Jean-Claude Parel
 21, Chemin De La Sauvegarde

OpenVMS Architect
 Ecully, 69132
458601
 France
Global Business Services
 

Phone:
+33-4-7218-4095
 

Home:
+33-4-7558-3550
 

Mobile:
+33-6.7171.0434
 

e-mail:
jcpa...@fr.ibm.com
 





From:   Dan Gahlinger <dgahl...@hotmail.com>
To: "simh@trailing-edge.com" <simh@trailing-edge.com>
Date:   08/02/2018 00:23
Subject:    [Simh] anyone know how to convert/translate turbo pascal 
to vax  pascal?
Sent by:"Simh" <simh-boun...@trailing-edge.com>



since I did all that work recreating "castle" from the vax to the pc
using turbo pascal (then free pascal)
I'd like to "port" it back to the vax,
but the vms 7.3 pascal compiler doesn't recognize "writeln"
and I suspect things like types and records and case statements wont work 
either.

anyone have any ideas?

Dan.___
Simh mailing list
Simh@trailing-edge.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.trailing-2Dedge.com_mailman_listinfo_simh=DwIGaQ=jf_iaSHvJObTbx-siA1ZOg=2AoVEMvcRW1lMiTIMmGiShO4dQKZolvsh1Oz2GpyULA=kBTeleKQgfrR6y8Kw12VpacrQiQq_ve78r42GbuTm_Y=-8Yo9ZMSPPqtyziB4HmH1HGDab1QlvV0yoXpMZFd6es=


Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 657.364.587 ?
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Dan Gahlinger
I didn't port it from vax pascal.
in fact, I've never done any vax pascal programming in my life.

I ported it from vax fortran to turbo pascal. yeah, that was fun, not.

but now I want to move my new code back to the vax in whatever language.

vax basic is the one I'm most familiar with, followed by DCL

the free pascal code is on the order of several hundred thousand lines of 
source code.
it's become quite a beast over the decades.
maybe I'll spend the next 38 years porting it back 
Dan.

From: Jeremy Begg <jer...@vsm.com.au>
Sent: February 8, 2018 1:36 AM
To: Dan Gahlinger
Cc: Jeremy Begg; Jon Elson; simh@trailing-edge.com
Subject: Re: [Simh] anyone know how to convert/translate turbo pascal to vax 
pascal?

Despite porting the program from VAX Pascal to various flavours of other 
Pascal, it seems you don’t recall much about the language.
Moving from Pascal to BASIC would be quite an exercise.

In VAX Pascal the reserved identifiers INPUT and OUTPUT refer to SYS$INPUT and 
SYS$OUTPUT, respectively.
Here’s a simple program which prompts for user input.

program hello(input,output);
var s : varying [80] of char;
begin
write('What is your name? ');
while not eof(input) do
begin
readln(s);
if length(s) > 0 then break;
write('What is your name? ');
end;
writeln('Hello ', s);
end.

Jeremy

On 8 Feb 2018, at 4:49 PM, Dan Gahlinger 
<dgahl...@hotmail.com<mailto:dgahl...@hotmail.com>> wrote:

I found a hello world pascal example online for vms,
so at least that much I can get working.

however, all the docs online are not so useful for programming itself.
my code has input and output from the terminal and from files.
the hello program uses: program hello(output);
so not sure how to do in and out from the terminal.
tried googling examples but no such luck beyond hello world.

it might be easier for me to port to vax basic, I used to be an expert at that, 
many moons ago.

Dan.

From: Simh 
<simh-boun...@trailing-edge.com<mailto:simh-boun...@trailing-edge.com>> on 
behalf of Jon Elson <el...@pico-systems.com<mailto:el...@pico-systems.com>>
Sent: February 7, 2018 9:25 PM
To: simh@trailing-edge.com<mailto:simh@trailing-edge.com>
Subject: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

On 02/07/2018 05:57 PM, 
simh-requ...@trailing-edge.com<mailto:simh-requ...@trailing-edge.com> wrote:
> [Simh] anyone know how to convert/translate turbo pascal to
>vax pascal?
> Message-ID:
>
> <dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com<mailto:dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com>>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> since I did all that work recreating "castle" from the vax to the pc
> using turbo pascal (then free pascal)
> I'd like to "port" it back to the vax,
> but the vms 7.3 pascal compiler doesn't recognize "writeln"
> and I suspect things like types and records and case statements wont work 
> either.
>
> anyone have any ideas?
Umm, I just looked back at some Pascal code I had on VAX
Pascal, and it DEFINITELY has writeln statements in it.
This is such basic Pascal syntax, I can't imagine that did
not work.  But, maybe you have to enable some library or
Pascal "unit" to use those functions.

Jon
___
Simh mailing list
Simh@trailing-edge.com<mailto:Simh@trailing-edge.com>
http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com<mailto:Simh@trailing-edge.com>
http://mailman.trailing-edge.com/mailman/listinfo/simh

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Jeremy Begg
Despite porting the program from VAX Pascal to various flavours of other 
Pascal, it seems you don’t recall much about the language.
Moving from Pascal to BASIC would be quite an exercise.

In VAX Pascal the reserved identifiers INPUT and OUTPUT refer to SYS$INPUT and 
SYS$OUTPUT, respectively.
Here’s a simple program which prompts for user input.

program hello(input,output);
var s : varying [80] of char;
begin
write('What is your name? ');
while not eof(input) do
begin
readln(s);
if length(s) > 0 then break;
write('What is your name? ');
end;
writeln('Hello ', s);
end.

Jeremy

> On 8 Feb 2018, at 4:49 PM, Dan Gahlinger <dgahl...@hotmail.com> wrote:
> 
> I found a hello world pascal example online for vms,
> so at least that much I can get working.
> 
> however, all the docs online are not so useful for programming itself.
> my code has input and output from the terminal and from files.
> the hello program uses: program hello(output);
> so not sure how to do in and out from the terminal.
> tried googling examples but no such luck beyond hello world.
> 
> it might be easier for me to port to vax basic, I used to be an expert at 
> that, many moons ago.
> 
> Dan.
> From: Simh <simh-boun...@trailing-edge.com 
> <mailto:simh-boun...@trailing-edge.com>> on behalf of Jon Elson 
> <el...@pico-systems.com <mailto:el...@pico-systems.com>>
> Sent: February 7, 2018 9:25 PM
> To: simh@trailing-edge.com <mailto:simh@trailing-edge.com>
> Subject: [Simh] anyone know how to convert/translate turbo pascal to vax 
> pascal?
>  
> On 02/07/2018 05:57 PM, simh-requ...@trailing-edge.com 
> <mailto:simh-requ...@trailing-edge.com> wrote:
> > [Simh] anyone know how to convert/translate turbo pascal to
> >vax pascal?
> > Message-ID:
> >
> > <dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com
> >  
> > <mailto:dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com>>
> >
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > since I did all that work recreating "castle" from the vax to the pc
> > using turbo pascal (then free pascal)
> > I'd like to "port" it back to the vax,
> > but the vms 7.3 pascal compiler doesn't recognize "writeln"
> > and I suspect things like types and records and case statements wont work 
> > either.
> >
> > anyone have any ideas?
> Umm, I just looked back at some Pascal code I had on VAX 
> Pascal, and it DEFINITELY has writeln statements in it.
> This is such basic Pascal syntax, I can't imagine that did 
> not work.  But, maybe you have to enable some library or 
> Pascal "unit" to use those functions.
> 
> Jon
> ___
> Simh mailing list
> Simh@trailing-edge.com <mailto:Simh@trailing-edge.com>
> http://mailman.trailing-edge.com/mailman/listinfo/simh 
> <http://mailman.trailing-edge.com/mailman/listinfo/simh>___
> Simh mailing list
> Simh@trailing-edge.com <mailto:Simh@trailing-edge.com>
> http://mailman.trailing-edge.com/mailman/listinfo/simh 
> <http://mailman.trailing-edge.com/mailman/listinfo/simh>
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Dan Gahlinger
I found a hello world pascal example online for vms,
so at least that much I can get working.

however, all the docs online are not so useful for programming itself.
my code has input and output from the terminal and from files.
the hello program uses: program hello(output);
so not sure how to do in and out from the terminal.
tried googling examples but no such luck beyond hello world.

it might be easier for me to port to vax basic, I used to be an expert at that, 
many moons ago.

Dan.

From: Simh <simh-boun...@trailing-edge.com> on behalf of Jon Elson 
<el...@pico-systems.com>
Sent: February 7, 2018 9:25 PM
To: simh@trailing-edge.com
Subject: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

On 02/07/2018 05:57 PM, simh-requ...@trailing-edge.com wrote:
> [Simh] anyone know how to convert/translate turbo pascal to
>vax pascal?
> Message-ID:
>
> <dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> since I did all that work recreating "castle" from the vax to the pc
> using turbo pascal (then free pascal)
> I'd like to "port" it back to the vax,
> but the vms 7.3 pascal compiler doesn't recognize "writeln"
> and I suspect things like types and records and case statements wont work 
> either.
>
> anyone have any ideas?
Umm, I just looked back at some Pascal code I had on VAX
Pascal, and it DEFINITELY has writeln statements in it.
This is such basic Pascal syntax, I can't imagine that did
not work.  But, maybe you have to enable some library or
Pascal "unit" to use those functions.

Jon
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

[Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Jon Elson

On 02/07/2018 05:57 PM, simh-requ...@trailing-edge.com wrote:

[Simh] anyone know how to convert/translate turbo pascal to
vax pascal?
Message-ID:

<dm3pr16mb0813e13bb9f23f23569db71ac9...@dm3pr16mb0813.namprd16.prod.outlook.com>

Content-Type: text/plain; charset="iso-8859-1"

since I did all that work recreating "castle" from the vax to the pc
using turbo pascal (then free pascal)
I'd like to "port" it back to the vax,
but the vms 7.3 pascal compiler doesn't recognize "writeln"
and I suspect things like types and records and case statements wont work 
either.

anyone have any ideas?
Umm, I just looked back at some Pascal code I had on VAX 
Pascal, and it DEFINITELY has writeln statements in it.
This is such basic Pascal syntax, I can't imagine that did 
not work.  But, maybe you have to enable some library or 
Pascal "unit" to use those functions.


Jon
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Timothe Litt
On 07-Feb-18 18:22, Dan Gahlinger wrote:
> since I did all that work recreating "castle" from the vax to the pc
> using turbo pascal (then free pascal)
> I'd like to "port" it back to the vax,
> but the vms 7.3 pascal compiler doesn't recognize "writeln"
I would be very surprised by this; writeln is in my copy of Jensen & Wirth.
writeln is also in the PASCAL user manual -
http://bitsavers.trailing-edge.com/pdf/dec/vax/lang/pascal/AI-H485E-TE_VAX_PASCAL_User_Manual_Feb87.pdf

See also the language reference manual -
http://pascal-central.com/docs/pascal-refmanual.pdf, which lists WRITELN
as a predeclared procedure.

> and I suspect things like types and records and case statements wont
> work either.
>
> anyone have any ideas?
>
I don't have VAX PASCAL installed.  And I never used Turbo PASCAL.

But I'd start with HELP PASCAL (at the DCL prompt).

Look for a sub-topic like Language, Syntax, and/or RTL.  VAX languages
generally have detailed help.
You'll probably find your answer there. 

Also, you may need /standard:(validation with ANSI or ISO), and or
/old_version depending on what flavor/version of VAX pascal you used. 
See appendix D.

Use the manuals for gory details.

> Dan.
>



smime.p7s
Description: S/MIME Cryptographic Signature
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] anyone know how to convert/translate turbo pascal to vax pascal?

2018-02-07 Thread Armistead, Jason
Dan

What exact version of Pascal compiler are you using ?  (presumably you are 
using OpenVMS 7.3 on a VAX  as the operating system)

What is the exact message the complier gives concerning the writeln() function?

Can you generate a simple “proof of concept” and share what you are doing ?

Looking at the HP Pascal for OpenVMS Language Reference Manual (for V5.8/V5.9) 
it is supported

http://h30266.www3.hpe.com/odl/i64lp/progtool/pasi6461/pasi64rm.pdf

It’s hard to “suspect” that types and records are also non-existent, along with 
writeln().  They’re part of what makes Pascal, well …, Pascal !


Jason


From: Simh [mailto:simh-boun...@trailing-edge.com] On Behalf Of Dan Gahlinger
Sent: Wednesday, 7 February 2018 6:22 PM
To: simh@trailing-edge.com
Subject: [External] [Simh] anyone know how to convert/translate turbo pascal to 
vax pascal?

since I did all that work recreating "castle" from the vax to the pc
using turbo pascal (then free pascal)
I'd like to "port" it back to the vax,
but the vms 7.3 pascal compiler doesn't recognize "writeln"
and I suspect things like types and records and case statements wont work 
either.

anyone have any ideas?

Dan.
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh