Discussion:
VMS Pascal article
Add Reply
Arne Vajhøj
2025-01-01 16:12:57 UTC
Reply
Permalink
VMS Pascal for C/Java/C# programmers:
https://www.vajhoej.dk/arne/articles/vmspascal.html

It is a "pre-release" - I am not sure I got it right.

So I would love some feedback.

Arne
Chris Townley
2025-01-01 16:31:53 UTC
Reply
Permalink
     https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Arne
Interesting - many thanks
I was surprised to see that Pascal was created in 2970!
--
Chris
Arne Vajhøj
2025-01-01 16:39:56 UTC
Reply
Permalink
Post by Chris Townley
      https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Interesting - many thanks
I was surprised to see that Pascal was created in 2970!
Ooops. Let me fix that.

Arne
Dennis Boone
2025-01-01 18:50:55 UTC
Reply
Permalink
Post by Chris Townley
I was surprised to see that Pascal was created in 2970!
In the year 3535, if Wirth is still alive...

De
Marc Van Dyck
2025-01-02 10:01:50 UTC
Reply
Permalink
Post by Arne Vajhøj
https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Arne
I like it.

In the first section, you might also mention that VMS Pascal has
excellent support in LSE/SCA - for those who still use DECset...

Didn't see anything about the VARYING type and its so useful
<varying>.BODY and <varying>.LENGTH functions, as well as READV and
WRITEV. Probably the most important things to know if you have to
manipulate character strings.

May be also mention that the VMS Pascal compiler comes with declaration
modules for all VMS system services and RTLs. Combined with LSE/SCA
support, this makes system programming extremely easy.

Ah, and also, good support of VMS Pascal by SDL...
--
Marc Van Dyck
Arne Vajhøj
2025-01-02 22:19:14 UTC
Reply
Permalink
Post by Marc Van Dyck
      https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
In the first section, you might also mention that VMS Pascal has
excellent support in LSE/SCA - for those who still use DECset...
Added something about choices for editor.
Post by Marc Van Dyck
Didn't see anything about the VARYING type and its so useful
<varying>.BODY and <varying>.LENGTH functions, as well as READV and
WRITEV. Probably the most important things to know if you have to
manipulate character strings.
May be also mention that the VMS Pascal compiler comes with declaration
modules for all VMS system services and RTLs. Combined with LSE/SCA
support, this makes system programming extremely easy.
Added mention of SYS$LIBRARY:STARLET and SYS$LIBRARY:LIB$ROUTINES and
added example making 3 simple LIB$ calls.

And used that to show and explain .BODY and .LENGTH, which made
sense to me because that is where I typical use them.
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.

:-)

Arne
Lawrence D'Oliveiro
2025-01-03 00:34:04 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
SDL is just the common language used for defining interfaces. That’s how
files like STARLET.PAS get automatically generated.
Arne Vajhøj
2025-01-03 01:49:43 UTC
Reply
Permalink
Post by Lawrence D'Oliveiro
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
SDL is just the common language used for defining interfaces. That’s how
files like STARLET.PAS get automatically generated.
I know what it is is. Otherwise I could not have commented on
the level.

Arne
Lawrence D'Oliveiro
2025-01-03 02:53:16 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Lawrence D'Oliveiro
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
SDL is just the common language used for defining interfaces. That’s
how files like STARLET.PAS get automatically generated.
I know what it is is.
It’s also not that hard to understand, if you take the “Rosetta Stone”
approach of looking at the original SDL source and comparing with its
output for a particular language that you know.

There was also one called MDL, if I recall rightly, which looked like it
was more on the MACRO level.
Robert A. Brooks
2025-01-03 03:30:36 UTC
Reply
Permalink
Post by Lawrence D'Oliveiro
Post by Arne Vajhøj
Post by Lawrence D'Oliveiro
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
SDL is just the common language used for defining interfaces. That’s
how files like STARLET.PAS get automatically generated.
I know what it is is.
It’s also not that hard to understand, if you take the “Rosetta Stone”
approach of looking at the original SDL source and comparing with its
output for a particular language that you know.
There was also one called MDL, if I recall rightly, which looked like it
was more on the MACRO level.
Depending on whom you ask, it was either Module or Maynard Definition Language.
--
--- Rob
Simon Clubley
2025-01-03 13:10:03 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
SDL is just the common language used for defining interfaces. That?s how
files like STARLET.PAS get automatically generated.
I know what it is is. Otherwise I could not have commented on
the level.
The open source ecosystem equivalent is called swig, which comes across
as much more flexible than SDL:

https://www.swig.org/tutorial.html

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2025-01-03 01:52:10 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
:-)
But speaking of SDL.

Does anybody know what VSI's plan is for SDL on VMS x86-64?
Rewrite?

Arne
Robert A. Brooks
2025-01-03 03:29:19 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
:-)
But speaking of SDL.
Does anybody know what VSI's plan is for SDL on VMS x86-64?
Rewrite?
It's written in C++ so we were waiting for a native C++ compiler.

As it turns out, SDL uncovered some dark areas of the compiler that needed
addressing.

We have a working SDL on X86 now.
--
--- Rob
Arne Vajhøj
2025-01-03 03:32:21 UTC
Reply
Permalink
Post by Robert A. Brooks
Post by Arne Vajhøj
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
:-)
But speaking of SDL.
Does anybody know what VSI's plan is for SDL on VMS x86-64?
Rewrite?
It's written in C++ so we were waiting for a native C++ compiler.
As it turns out, SDL uncovered some dark areas of the compiler that needed
addressing.
We have a working SDL on X86 now.
I thought it was PL/I. Which is why I asked.

Arne
Robert A. Brooks
2025-01-03 03:48:35 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Robert A. Brooks
Post by Arne Vajhøj
Post by Arne Vajhøj
Post by Marc Van Dyck
Ah, and also, good support of VMS Pascal by SDL...
Too advanced for me.
:-)
But speaking of SDL.
Does anybody know what VSI's plan is for SDL on VMS x86-64?
Rewrite?
It's written in C++ so we were waiting for a native C++ compiler.
As it turns out, SDL uncovered some dark areas of the compiler that needed
addressing.
We have a working SDL on X86 now.
I thought it was PL/I. Which is why I asked.
Rewritten in the early 2000's.
--
--- Rob
Arne Vajhøj
2025-01-03 12:59:58 UTC
Reply
Permalink
Post by Robert A. Brooks
Post by Arne Vajhøj
Post by Robert A. Brooks
Post by Arne Vajhøj
But speaking of SDL.
Does anybody know what VSI's plan is for SDL on VMS x86-64?
Rewrite?
It's written in C++ so we were waiting for a native C++ compiler.
As it turns out, SDL uncovered some dark areas of the compiler that needed
addressing.
We have a working SDL on X86 now.
I thought it was PL/I. Which is why I asked.
Rewritten in the early 2000's.
Ah. So it was rewritten for Itanium instead of being AEST'ed.

I wonder whether it was because someone at HP decided
to do the right thing or because AEST couldn't handle
it.

Arne
Robert A. Brooks
2025-01-03 14:30:37 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Robert A. Brooks
Post by Arne Vajhøj
I thought it was PL/I. Which is why I asked.
Rewritten in the early 2000's.
Ah. So it was rewritten for Itanium instead of being AEST'ed.
I wonder whether it was because someone at HP decided
to do the right thing or because AEST couldn't handle
it.
I am not aware of an attempt to AEST it; it was rewritten
by Walter Breu (sp?) of HP Germany. He was not in VMS Engineering,
so I wasn't paying a lot of attention when he was doing the work.

Pretty sure it was part of the "get rid of all PL/I" initiative.
--
--- Rob
Stephen Hoffman
2025-01-04 19:14:55 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Robert A. Brooks
Post by Arne Vajhøj
I thought it was PL/I. Which is why I asked.
Rewritten in the early 2000's.
Ah. So it was rewritten for Itanium instead of being AEST'ed.
I wonder whether it was because someone at HP decided to do the right
thing or because AEST couldn't handle it.
I am not aware of an attempt to AEST it; it was rewritten by Walter
Breu (sp?) of HP Germany. He was not in VMS Engineering, so I wasn't
paying a lot of attention when he was doing the work.
Pretty sure it was part of the "get rid of all PL/I" initiative.
That's basically correct, yes. And Walter Breu was the author of the
SDLC port and of some related updates. One of the goals of that SDLC
port was character-level-formatting compatibility with the PL/I version
of the SDL tool; matching DIFF'ing.

Various factors that triggered this port including the transition of
PL/I to Uniprise and later Kednos — and particularly the lack of a PL/I
compiler on Itanium — and caused an interest in reducing the usage of
PL/I within OpenVMS. MONITOR was the biggest existing user of PL/I.

Translating the existing SDL tool to OpenVMS I64 worked, but obviously
wasn't a great choice for maintenance and updates, and changes to SDL
in support of Itanium were needed. And the original PL/1 SDL
implementation also wasn't itself entirely stable. It crashed. A lot.
And translating (AEST and TIE) an unstable app is less than fun.

There were other OpenVMS and OpenVMS build components that were
re-written around each OpenVMS platform port too, and those rewrites
for various reasons. MAIL got rewritten, GNM, MONITOR as mentioned,
etc. There are undoubtedly tools that have more recently been rewritten
as part of the x86-64 port, too.
--
Pure Personal Opinion | HoffmanLabs LLC
Arne Vajhøj
2025-01-04 19:54:26 UTC
Reply
Permalink
Post by Stephen Hoffman
Post by Arne Vajhøj
Post by Robert A. Brooks
Post by Arne Vajhøj
I thought it was PL/I. Which is why I asked.
Rewritten in the early 2000's.
Ah. So it was rewritten for Itanium instead of being AEST'ed.
I wonder whether it was because someone at HP decided to do the right
thing or because AEST couldn't handle it.
I am not aware of an attempt to AEST it; it was rewritten by Walter
Breu (sp?) of HP Germany.  He was not in VMS Engineering, so I wasn't
paying a lot of attention when he was doing the work.
Pretty sure it was part of the "get rid of all PL/I" initiative.
That's basically correct, yes. And Walter Breu was the author of the
SDLC port and of some related updates. One of the goals of that SDLC
port was character-level-formatting compatibility with the PL/I version
of the SDL tool; matching DIFF'ing.
Various factors that triggered this port including the transition of PL/
I to Uniprise and later Kednos — and particularly the lack of a PL/I
compiler on Itanium — and caused an interest in reducing the usage of
PL/I within OpenVMS. MONITOR was the biggest existing user of PL/I.
Walter Braeu

I tried installing 2.3 on VMS Alpha.

And the installation procedure attempts to send an
email to him at hp.com.

Unusual!

Arne
Simon Clubley
2025-01-06 13:38:30 UTC
Reply
Permalink
Post by Arne Vajhøj
I tried installing 2.3 on VMS Alpha.
And the installation procedure attempts to send an
email to him at hp.com.
Unusual!
Not really. The guy was just ahead of his time. :-)

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Robert A. Brooks
2025-01-06 14:46:55 UTC
Reply
Permalink
Post by Simon Clubley
Post by Arne Vajhøj
I tried installing 2.3 on VMS Alpha.
And the installation procedure attempts to send an
email to him at hp.com.
Unusual!
Not really. The guy was just ahead of his time. :-)
That mechanism was pretty common within DEC in the '80's and 90's for internal software, so developers could keep track
of who was using it.
--
-- Rob
Lawrence D'Oliveiro
2025-01-04 22:09:19 UTC
Reply
Permalink
And Walter Breu was the author of the SDLC port ...
SDLC? Synchronous Data Link Control?

Oh ... SDL for C? Perhaps better written SDL-C?
David Meyer
2025-01-03 11:52:59 UTC
Reply
Permalink
You wrote it for me! Many thanks. It looks like a very useful document.
--
David Meyer
Takarazuka, Japan
***@sdf.org
Dan Cross
2025-01-03 15:11:43 UTC
Reply
Permalink
Post by Arne Vajhøj
https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
You should get a native English speaker to edit for grammar.

C supports 'long double' which _may_ be the same as
`quadruple`, depending on the implementation, though
that's usually 80-bit floats. There is also _Float128,
_Quad, and __float128.

You mention `packed array` for dealing with character data,
but mention the usual, non-packed variant only in passing
later. It may be useful to explain the difference and why
it matters: `packed` originated on the CDC6500, where Wirth
wanted to fit multiple values into a machine word (that
was a word-oriented machine). You curiously don't mention
the String type at all. From
https://docs.vmssoftware.com/vsi-pascal-for-openvms-reference-manual/#STRING_TYPES_SEC:

|The STRING types provide a standard way for you to specify
|storage for varying-length character strings with a maximum
|length that can be specified at run time.

When discussing comparisons to other languages, you seem to
lump C, Java, and C# all in the same general bucket, which is
odd. Java and C# are closer to one another, but compared to
C they support rather different programming paradigms (OO and
some functional versus strictly procedural, or pseudo-OO
implemented by the programmer). It would be useful to state
clearly that VSI Pascal is a procedural language.

You write this:

|Pascal has pointers, but Pascal pointers are more like
|Java/C# references than C pointers.
|
|Pascal pointers can be used to allocate, to reference the
|allocated and to free the allocated. No fancy pointer arithmetic.

Don't bury the lede: if you're going to say that Pascal pointers
are "more like Java/C# references than C pointers" then say why
immediately, don't wait until the second sentence of the next
paragraph.

Also, "Pascal pointers can be used to allocate" doesn't make
much sense. Pointers can be used to point to allocated storage,
sure, but they are not themselves a memory allocator.

Here's a potential rewrite:

|Pascal has pointers: they can be null, and can point to
|allocated storage. But unlike C, they do not support pointer
|arithmetic. In this sense, they are closer to references in
|Java and C#.

I would not say that 'chr' and 'ord' are like casts in C.
Pascal is strongly, statically typed; C is weakly typed with
implicit conversions. Conversion between characters and integer
types in Pascal is an explicit operation, but `int c = 'a' + 1;`
is perfectly legal in C.

You give two C equivalents of, `round`: `lround` and
`ceil(v + 0.5)`. Surely the latter should be `trunc(v + 0.5)`:

term% cat d.c
#include <stdio.h>
#include <math.h>

int
main()
{
printf("ceil(0.2 + 0.5) = %g\n", ceil(0.2 + 0.5));
printf("ceil(0.6 + 0.5) = %g\n", ceil(0.6 + 0.5));
printf("trunc(0.6 + 0.5) = %g\n", trunc(0.6 + 0.5));
return 0;
}
term% make d
cc d.c -o d
: chandra; ./d
ceil(0.2 + 0.5) = 1
ceil(0.6 + 0.5) = 2
trunc(0.6 + 0.5) = 1
term%

But, consider negative numbers, and note that one would still
have to do a conversion to an integer type.

Similarly, Java's `Math.ceil` is not the same as Pascal's
`trunc`, unless the number is negative, and again there's the
integer conversion to consider.

Your C equivalent of `substr` is not correct; exercise left to
the reader (consider what happens when `ix` is beyond the end of
the string). For that matter, this is true of the VSI Pascal
example as well: you should specify the preconditions that must
be true.

You may want to mention that strings are origin 1, not origin 0,
as in most syntactically C-like languages. Also, array bounds
are inclusive in Pascal, unlike in C et al where the upper bound
is exclusive: `array [0..10] of integer` has 11 elements in
Pascal, while `array [1..10] of integer` has 10.

`readln` and `fgets` are not similar in that `readln` strips the
line ending sequence, and `fgets` does not.

`f = fopen,fnm "r");` is an obvious typo.
`while not eof(f)) do` is an obvious typo.

You might want to mention what `reset` and `rewrite` do. You
might want to mention `extend` and compare to `fopen(..., "a")`
or whatever.

You may want to mention that Pascal, the semicolon is a
statement separator, not a terminator, and hence why the last
"END" in the protocol is followed by "." and not ";".

The structure you present at the end as "equivalent" of a
varying character array is not correct. `integer16` is a signed
type, with a maximum value of 32,767. The length field for a
`varying [n] of char` is an integer subrange type with word
representation. That is, `length` is unsigned 0..max, where max
is <= 65,535.

- Dan C.
Arne Vajhøj
2025-01-03 16:45:59 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
C supports 'long double' which _may_ be the same as
`quadruple`, depending on the implementation, though
that's usually 80-bit floats.
Very good point. It is 128 bit on VMS unless using /L_DOUBLE=64.

Added.
Post by Dan Cross
I would not say that 'chr' and 'ord' are like casts in C.
Pascal is strongly, statically typed; C is weakly typed with
implicit conversions. Conversion between characters and integer
types in Pascal is an explicit operation, but `int c = 'a' + 1;`
is perfectly legal in C.
It was the best explanation I could come up with.
Post by Dan Cross
You give two C equivalents of, `round`: `lround` and
Ooops. All ceil should be floor.

Fixed.
Post by Dan Cross
But, consider negative numbers,
Very good point.

I have added notes.
Post by Dan Cross
and note that one would still
have to do a conversion to an integer type.
Yes.

Fixed.
Post by Dan Cross
Your C equivalent of `substr` is not correct; exercise left to
the reader (consider what happens when `ix` is beyond the end of
the string). For that matter, this is true of the VSI Pascal
example as well: you should specify the preconditions that must
be true.
Invalid index or length causes an exception in VMS Pascal.

But I don't want to get into that level of detail.
Post by Dan Cross
`readln` and `fgets` are not similar in that `readln` strips the
line ending sequence, and `fgets` does not.
Close enough for the purpose of this article.
Post by Dan Cross
`f = fopen,fnm "r");` is an obvious typo.
`while not eof(f)) do` is an obvious typo.
Fixed.
Post by Dan Cross
You may want to mention that Pascal, the semicolon is a
statement separator, not a terminator, and hence why the last
"END" in the protocol is followed by "." and not ";".
The article is more what to do than why to do that.
Post by Dan Cross
The structure you present at the end as "equivalent" of a
varying character array is not correct. `integer16` is a signed
type, with a maximum value of 32,767. The length field for a
`varying [n] of char` is an integer subrange type with word
representation. That is, `length` is unsigned 0..max, where max
is <= 65,535.
Ooops.

You are right.

I was sure that the limit was 32K but it is 64K.

Fixed.

And also fixed in the description of VARYING further up.

Arne
Dan Cross
2025-01-03 18:17:25 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
C supports 'long double' which _may_ be the same as
`quadruple`, depending on the implementation, though
that's usually 80-bit floats.
Very good point. It is 128 bit on VMS unless using /L_DOUBLE=64.
Added.
Post by Dan Cross
I would not say that 'chr' and 'ord' are like casts in C.
Pascal is strongly, statically typed; C is weakly typed with
implicit conversions. Conversion between characters and integer
types in Pascal is an explicit operation, but `int c = 'a' + 1;`
is perfectly legal in C.
It was the best explanation I could come up with.
Why not simply say that Pascal is strongly typed, and C is not?
Conversion from a Pascal character to an integer type requires
using an explicit conversion operation; in C you don't, though
one may cast.
Post by Arne Vajhøj
Post by Dan Cross
You give two C equivalents of, `round`: `lround` and
Ooops. All ceil should be floor.
Fixed.
Post by Dan Cross
But, consider negative numbers,
Very good point.
I have added notes.
Post by Dan Cross
and note that one would still
have to do a conversion to an integer type.
Yes.
Fixed.
Post by Dan Cross
Your C equivalent of `substr` is not correct; exercise left to
the reader (consider what happens when `ix` is beyond the end of
the string). For that matter, this is true of the VSI Pascal
example as well: you should specify the preconditions that must
be true.
Invalid index or length causes an exception in VMS Pascal.
But I don't want to get into that level of detail.
*Shrug* it's your document, but in C that'll just be UB.
Post by Arne Vajhøj
Post by Dan Cross
`readln` and `fgets` are not similar in that `readln` strips the
line ending sequence, and `fgets` does not.
Close enough for the purpose of this article.
Perhaps. I may be worth an asterisk, as often C programmers
will want to write:

while ((s = fgets(s, len, fp)) != NULL) {
char *nl = strchr(s, '\n');
if (nl != NULL)
*nl = '\0';
}

Which is a bit more cumbersome than the Pascal equivalent. When
carriage returns get mixed in, it gets even nastier, so much so
that one may just write a helper function to deal with it.
Post by Arne Vajhøj
Post by Dan Cross
`f = fopen,fnm "r");` is an obvious typo.
`while not eof(f)) do` is an obvious typo.
Fixed.
Fixed, but the comparison to C is slightly wrong:

`while not(eof(f)) do` is not exactly the same as
`while(!feof(f))`. In particular, while in VSI Pascal `EOF(f)`
will be true on the first iteration of the loop if `f` is empty,
the same is not true for `feof` from stdio: in order for `feof`
to be true, stdio must observe the end-of-file condition of `f`
via some input operation. This leads to awkward code sequences
like this:

ch = fgetc(fp);
while (!feof(fp)) {
/*
* Do something with `ch`
* ...
*/
ch = fgetc(fp);
}
Post by Arne Vajhøj
Post by Dan Cross
You may want to mention that Pascal, the semicolon is a
statement separator, not a terminator, and hence why the last
"END" in the protocol is followed by "." and not ";".
The article is more what to do than why to do that.
It's actually a rather important syntactical detail of the
language, and the reason one can often omit semi-colons in
surprising ways. It's the reason one can write, e.g.:

if foo <> 0 then x := 1 else y := 2;

But hey, it's your document.
Post by Arne Vajhøj
Post by Dan Cross
The structure you present at the end as "equivalent" of a
varying character array is not correct. `integer16` is a signed
type, with a maximum value of 32,767. The length field for a
`varying [n] of char` is an integer subrange type with word
representation. That is, `length` is unsigned 0..max, where max
is <= 65,535.
Ooops.
You are right.
I was sure that the limit was 32K but it is 64K.
Fixed.
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.

I would also seriously recommend revising the section on
pointers.

Also, it's a bit of a bummer that you didn't mention nested
functions/procedures, which are among the cooler aspects of the
language:

$ type foo.pas
(* foo *)
program foo(output);
procedure hello;
procedure world(var who: String);
function punct: char;
begin
punct := '!'
end;
begin
who := 'World' + punct
end;
var
who: String (10);
begin
world(who);
writeln('Hello, ', who)
end;
begin
hello
end.
$ pascal foo.pas
$ link foo
$ run foo
Hello, World!
$

- Dan C.
Arne Vajhøj
2025-01-03 18:35:35 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
`readln` and `fgets` are not similar in that `readln` strips the
line ending sequence, and `fgets` does not.
Close enough for the purpose of this article.
Perhaps. I may be worth an asterisk, as often C programmers
while ((s = fgets(s, len, fp)) != NULL) {
char *nl = strchr(s, '\n');
if (nl != NULL)
*nl = '\0';
}
Which is a bit more cumbersome than the Pascal equivalent. When
carriage returns get mixed in, it gets even nastier, so much so
that one may just write a helper function to deal with it.
I think you are right. I have added a note.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
`f = fopen,fnm "r");` is an obvious typo.
`while not eof(f)) do` is an obvious typo.
Fixed.
`while not(eof(f)) do` is not exactly the same as
`while(!feof(f))`. In particular, while in VSI Pascal `EOF(f)`
will be true on the first iteration of the loop if `f` is empty,
the same is not true for `feof` from stdio: in order for `feof`
to be true, stdio must observe the end-of-file condition of `f`
via some input operation. This leads to awkward code sequences
ch = fgetc(fp);
while (!feof(fp)) {
/*
* Do something with `ch`
* ...
*/
ch = fgetc(fp);
}
C feof is a crap function.

I think I will drop feof completely and add fgetc
not returning EOF. I already have fgets not returning NULL.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
The structure you present at the end as "equivalent" of a
varying character array is not correct. `integer16` is a signed
type, with a maximum value of 32,767. The length field for a
`varying [n] of char` is an integer subrange type with word
representation. That is, `length` is unsigned 0..max, where max
is <= 65,535.
Ooops.
You are right.
I was sure that the limit was 32K but it is 64K.
Fixed.
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Post by Dan Cross
Also, it's a bit of a bummer that you didn't mention nested
functions/procedures, which are among the cooler aspects of the
$ type foo.pas
(* foo *)
program foo(output);
procedure hello;
procedure world(var who: String);
function punct: char;
begin
punct := '!'
end;
begin
who := 'World' + punct
end;
var
who: String (10);
begin
world(who);
writeln('Hello, ', who)
end;
begin
hello
end.
There is already an example. fac is inside testfac.

I will add a note about it.

Arne
Dan Cross
2025-01-03 18:51:37 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
`readln` and `fgets` are not similar in that `readln` strips the
line ending sequence, and `fgets` does not.
Close enough for the purpose of this article.
Perhaps. I may be worth an asterisk, as often C programmers
while ((s = fgets(s, len, fp)) != NULL) {
char *nl = strchr(s, '\n');
if (nl != NULL)
*nl = '\0';
}
Which is a bit more cumbersome than the Pascal equivalent. When
carriage returns get mixed in, it gets even nastier, so much so
that one may just write a helper function to deal with it.
I think you are right. I have added a note.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
`f = fopen,fnm "r");` is an obvious typo.
`while not eof(f)) do` is an obvious typo.
Fixed.
`while not(eof(f)) do` is not exactly the same as
`while(!feof(f))`. In particular, while in VSI Pascal `EOF(f)`
will be true on the first iteration of the loop if `f` is empty,
the same is not true for `feof` from stdio: in order for `feof`
to be true, stdio must observe the end-of-file condition of `f`
via some input operation. This leads to awkward code sequences
ch = fgetc(fp);
while (!feof(fp)) {
/*
* Do something with `ch`
* ...
*/
ch = fgetc(fp);
}
C feof is a crap function.
I think I will drop feof completely and add fgetc
not returning EOF. I already have fgets not returning NULL.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
The structure you present at the end as "equivalent" of a
varying character array is not correct. `integer16` is a signed
type, with a maximum value of 32,767. The length field for a
`varying [n] of char` is an integer subrange type with word
representation. That is, `length` is unsigned 0..max, where max
is <= 65,535.
Ooops.
You are right.
I was sure that the limit was 32K but it is 64K.
Fixed.
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Weird; I can't imagine why. Regardless, it may be worthwhile to
at least mention it, since you state explicitly that there are
three types for representing textual, string-like data, but
VSI's documentation makes it clear that there are actually four.
Post by Arne Vajhøj
Post by Dan Cross
Also, it's a bit of a bummer that you didn't mention nested
functions/procedures, which are among the cooler aspects of the
$ type foo.pas
(* foo *)
program foo(output);
procedure hello;
procedure world(var who: String);
function punct: char;
begin
punct := '!'
end;
begin
who := 'World' + punct
end;
var
who: String (10);
begin
world(who);
writeln('Hello, ', who)
end;
begin
hello
end.
There is already an example. fac is inside testfac.
I will add a note about it.
Ah, I see it now; the lack of indentation makes it hard to spot.

- Dan C.
Arne Vajhøj
2025-01-03 19:58:22 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Weird; I can't imagine why.
I never use string (on VMS).

$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("

indicate that whoever write VMS Pascal examples also prefer
varying of char over string.

If I were to guess about why, then I believe it is historic
reasons. varying of char has been there since like forever.
string was added with ISO Pascal support later.
Post by Dan Cross
Regardless, it may be worthwhile to
at least mention it, since you state explicitly that there are
three types for representing textual, string-like data, but
VSI's documentation makes it clear that there are actually four.
Good point.

I have updated.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Also, it's a bit of a bummer that you didn't mention nested
functions/procedures, which are among the cooler aspects of the
$ type foo.pas
(* foo *)
program foo(output);
procedure hello;
procedure world(var who: String);
function punct: char;
begin
punct := '!'
end;
begin
who := 'World' + punct
end;
var
who: String (10);
begin
world(who);
writeln('Hello, ', who)
end;
begin
hello
end.
There is already an example. fac is inside testfac.
I will add a note about it.
Ah, I see it now; the lack of indentation makes it hard to spot.
I don't indent them.

With the blank lines I put in then I feel that indenting
nested procedures/functions would make it too much space.

But it is a close decision. In C# I do not use blank lines
and I do indent local methods.

Same code:

using System;

public class Program
{
public static void TestFac()
{
int Fac(int n)
{
if(n < 2)
{
return 1;
}
else
{
return n * Fac(n - 1);
}
}
for(int i = 0; i < 6; i++)
{
Console.WriteLine("fac({0})={1}", i, Fac(i));
}
}
public static void Main(string[] args)
{
TestFac();
}
}

Arne
Dan Cross
2025-01-03 21:24:09 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Weird; I can't imagine why.
I never use string (on VMS).
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
indicate that whoever write VMS Pascal examples also prefer
varying of char over string.
If I were to guess about why, then I believe it is historic
reasons. varying of char has been there since like forever.
string was added with ISO Pascal support later.
I suspect that's close, but ISO Pascal doesn't have a 'VARYING'
array type, either.

I suspect you're referring to what ISO calls "Extended Pascal"
(ISO 10206); ISO Pascal (ISO 7185) doesn't support a `String`
type of either the VSI Pascal form or the Turbo
Pascal/Delphi/FreePascal form, only manifest string literals and
`packed array [1..n] of char`. Of course, one can define a type
alias, and ISO 7185 says this:

|Any type designated packed and denoted by an array-type having
|as its index-type a denotation of a subrange-type specifying a
|smallest value of 1 and a largest value of greater than 1, and
|having as its component-type a denotation of the char-type,
|shall be designated a string-type.

An annoyance with ISO Pascal is that an array's size is part of
its type, and there is no separate slice type that could act
as a window into an array independent of size and be passed
around, so it is difficult to write procedures and functions
that operate on e.g. strings, generically. See also,
https://www.lysator.liu.se/c/bwk-on-pascal.html

However, these deficiencies are largely addressed in ISO 10206
Extended Pascal, which provides a variable-length string type
and permits conformant array parameters, which for VSI Pascal
appear to monomorphize over the argument type.

It's perhaps worth noting that Wirth's subsequent languages,
particularly Oberon, didn't have most of these problems.
Post by Arne Vajhøj
Post by Dan Cross
Regardless, it may be worthwhile to
at least mention it, since you state explicitly that there are
three types for representing textual, string-like data, but
VSI's documentation makes it clear that there are actually four.
Good point.
I have updated.
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Also, it's a bit of a bummer that you didn't mention nested
functions/procedures, which are among the cooler aspects of the
$ type foo.pas
(* foo *)
program foo(output);
procedure hello;
procedure world(var who: String);
function punct: char;
begin
punct := '!'
end;
begin
who := 'World' + punct
end;
var
who: String (10);
begin
world(who);
writeln('Hello, ', who)
end;
begin
hello
end.
There is already an example. fac is inside testfac.
I will add a note about it.
Ah, I see it now; the lack of indentation makes it hard to spot.
I don't indent them.
With the blank lines I put in then I feel that indenting
nested procedures/functions would make it too much space.
Meh, personally I sacrifice horizontal space for readability,
but I suppose styles differ.

- Dan C.
Dan Cross
2025-01-03 21:51:43 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Weird; I can't imagine why.
I never use string (on VMS).
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
indicate that whoever write VMS Pascal examples also prefer
varying of char over string.
If I were to guess about why, then I believe it is historic
reasons. varying of char has been there since like forever.
string was added with ISO Pascal support later.
I suspect that's close, but ISO Pascal doesn't have a 'VARYING'
array type, either.
I suspect you're referring to what ISO calls "Extended Pascal"
(ISO 10206); ISO Pascal (ISO 7185) doesn't support a `String`
type of either the VSI Pascal form or the Turbo
Pascal/Delphi/FreePascal form, only manifest string literals and
`packed array [1..n] of char`. Of course, one can define a type
|Any type designated packed and denoted by an array-type having
|as its index-type a denotation of a subrange-type specifying a
|smallest value of 1 and a largest value of greater than 1, and
|having as its component-type a denotation of the char-type,
|shall be designated a string-type.
An annoyance with ISO Pascal is that an array's size is part of
its type, and there is no separate slice type that could act
as a window into an array independent of size and be passed
around, so it is difficult to write procedures and functions
that operate on e.g. strings, generically. See also,
https://www.lysator.liu.se/c/bwk-on-pascal.html
However, these deficiencies are largely addressed in ISO 10206
Extended Pascal, which provides a variable-length string type
and permits conformant array parameters, which for VSI Pascal
appear to monomorphize over the argument type.
Actually, I guess that conformant array parameterss were in ISO
7185, which had two "levels" of compliance; level 0 omitted them
and level 1 includes them. That language is retained in ISO
10206. Original, Wirth Pascal does not have them.

Extended Pascal's variable string type appears more or less
identical to the string type in VSI Pascal.

- Dan C.
Arne Vajhøj
2025-01-04 00:06:02 UTC
Reply
Permalink
Post by Dan Cross
Post by Dan Cross
However, these deficiencies are largely addressed in ISO 10206
Extended Pascal, which provides a variable-length string type
and permits conformant array parameters, which for VSI Pascal
appear to monomorphize over the argument type.
Actually, I guess that conformant array parameterss were in ISO
7185, which had two "levels" of compliance; level 0 omitted them
and level 1 includes them. That language is retained in ISO
10206. Original, Wirth Pascal does not have them.
Extended Pascal's variable string type appears more or less
identical to the string type in VSI Pascal.
The SPD ( https://vmssoftware.com/docs/VSI_Pascal_spd.pdf )
says:

<quote>
VSI Pascal is an implementation of the Pascal language that accepts
programs compatible with either
level of the ISO specification for Programming languages - Pascal ([ISO
7185-1987]) as well as
(ANSI/IEEE 770X3.97-1987).
...
VSI
Pascal also accepts many features from the Extended Pascal standard
((ANSI/IEEE 770X3. 160-1989)
and (ISO 10206)).
...
Major Pascal Language Elements:
...
● STRING schema denoting variable-length character strings up to 65,535
characters
</quote>

which I read as that string is supposed to be the standard (10206) string.

Arne
Arne Vajhøj
2025-01-03 23:53:23 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
Post by Dan Cross
Post by Arne Vajhøj
And also fixed in the description of VARYING further up.
You should seriously mention the STRING type, though.
I think VARYING OF CHAR is what is used most in VMS Pascal.
Weird; I can't imagine why.
I never use string (on VMS).
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
indicate that whoever write VMS Pascal examples also prefer
varying of char over string.
If I were to guess about why, then I believe it is historic
reasons. varying of char has been there since like forever.
string was added with ISO Pascal support later.
I suspect that's close, but ISO Pascal doesn't have a 'VARYING'
array type, either.
I am saying that VMS Pascal had VARYING before ISO existed. A
VMS specific (or DEC specific??) extension.
Post by Dan Cross
I suspect you're referring to what ISO calls "Extended Pascal"
(ISO 10206); ISO Pascal (ISO 7185) doesn't support a `String`
type of either the VSI Pascal form or the Turbo
Pascal/Delphi/FreePascal form, only manifest string literals and
`packed array [1..n] of char`.
Yes, 10206.

Arne
Lawrence D'Oliveiro
2025-01-03 21:34:46 UTC
Reply
Permalink
... I feel that indenting nested
procedures/functions would make it too much space.
At an indentation step of 4 columns and a window width of typically 100
columns, I find that leaves room for plenty of indentation steps.
Arne Vajhøj
2025-01-03 23:54:57 UTC
Reply
Permalink
Post by Lawrence D'Oliveiro
... I feel that indenting nested
procedures/functions would make it too much space.
At an indentation step of 4 columns and a window width of typically 100
columns, I find that leaves room for plenty of indentation steps.
I am typical at 132 width.

Width is not the problem.

But it looks like Iceland on a map of the northern
atlantic ocean.

Arne
David Meyer
2025-01-05 04:19:12 UTC
Reply
Permalink
Post by Arne Vajhøj
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
Wow! That directory and the others around it are a real treasure
trove. I found answers to questions I had about calling RTL routines
from Pascal.

Is there some introduction to VMS that collects links to resources like
sys$common:[syshlp.examples] where VMS newbies can look to answer their
own questions?
--
David Meyer
Takarazuka, Japan
***@sdf.org
Arne Vajhøj
2025-01-05 16:06:48 UTC
Reply
Permalink
Post by David Meyer
Post by Arne Vajhøj
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
Wow! That directory and the others around it are a real treasure
trove. I found answers to questions I had about calling RTL routines
from Pascal.
For system services and LIB$ (and other RTL) routines, then
I recommend:

General prep:
1) browse through documentation for system services and LIB$
routines to get an overview
2) learn about the VMS calling convention
3) learn about how to use VMS calling convention
in your favorite programming language
For specific task:
A) identify the system services and LIB$ routine you need
to use
B) read the language independent description of how to call it
C) implement call in your favorite programming language

System services:


https://docs.vmssoftware.com/vsi-openvms-system-services-reference-manual-a-getuai/


https://docs.vmssoftware.com/vsi-openvms-system-services-reference-manual-getutc-z/

Deep dive in SYS$QIO(W):

https://docs.vmssoftware.com/vsi-openvms-io-user-s-reference-manual/

(the name give different associations than what it is)

LIB$:

https://docs.vmssoftware.com/vsi-openvms-rtl-library-lib-manual/

SMG$:


https://docs.vmssoftware.com/vsi-openvms-rtl-screen-management-smg-manual/

Utility routines (do not forget these!!):

https://docs.vmssoftware.com/vsi-openvms-utility-routines/

Calling convention:

https://docs.vmssoftware.com/vsi-openvms-calling-standard/

General overview:


https://docs.vmssoftware.com/vsi-openvms-programming-concepts-manual-volume-i/


https://docs.vmssoftware.com/vsi-openvms-programming-concepts-manual-volume-ii/
Post by David Meyer
Is there some introduction to VMS that collects links to resources like
sys$common:[syshlp.examples] where VMS newbies can look to answer their
own questions?
I link to some some stuff at:

https://www.vajhoej.dk/arne/vms/docs.html

https://www.vajhoej.dk/arne/vms/faq.html

Arne
Arne Vajhøj
2025-01-05 16:12:50 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by David Meyer
Post by Arne Vajhøj
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
Wow! That directory and the others around it are a real treasure
trove. I found answers to questions I had about calling RTL routines
from Pascal.
For system services and LIB$ (and other RTL) routines, then
1) browse through documentation for system services and LIB$
   routines to get an overview
2) learn about the VMS calling convention
3) learn about how to use VMS calling convention
   in your favorite programming language
A) identify the system services and LIB$ routine you need
   to use
B) read the language independent description of how to call it
C) implement call in your favorite programming language
For specific questions then you can always ask here (or at
the VSI forum).

There is a fair chance that someone has tried it before and
maybe even have an example laying around.

I have written a few things that may be useful.

From the article that is the topic:

https://www.vajhoej.dk/arne/articles/vmspascal.html#proc_nonpas

https://www.vajhoej.dk/arne/articles/vmspascal.html#mod (scroll
down a page)

Other:

https://www.vajhoej.dk/arne/articles/call4.html#vms

And Pascal examples in:

https://www.vajhoej.dk/arne/articles/vmsipc.html

https://www.vajhoej.dk/arne/articles/rms.html

Arne
Stephen Hoffman
2025-01-05 20:49:59 UTC
Reply
Permalink
Post by Arne Vajhøj
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
Wow! That directory and the others around it are a real treasure trove.
While I haven't poked at the Pascal example code specifically (in the
past couple of decades), unfortunately most of the other example source
code examples included with OpenVMS itself also tended to be old,
ill-maintained, insecure, and/or buggy.

Various of the C code examples won't cleanly compile in recent decades,
or uses older or outdated APIs.

Decades ago, I tried to fix some of that mess, but other projects and
other funding priorities interceded.
I found answers to questions I had about calling RTL routines from Pascal.
Pascal is the proverbial deep end of the OpenVMS calling standard and
argument passing pool.

Usual path for figuring out the more obscure parts of Pascal argument
passing is the debugger, combined with the calling standard manual.

Write some code to call Pascal to Pascal for whatever argument-passing
you need, and use the debugger to reverse-engineer the descriptors used.
Is there some introduction to VMS that collects links to resources like
sys$common:[syshlp.examples] where VMS newbies can look to answer their
own questions?
Not that I've ever found. Most newbies don't do that. (And I write that
as somebody that worked on the OpenVMS FAQ, a document which was posted
here ~monthly in decades past.) You are, however, doing far better than
many of the newbies over the decades, in that you're asking for these
resources.

https://www.digiater.nl/openvms/freeware/v80/vmsfaq/vmsfaq.txt (with
other formats available)

https://web.archive.org/web/20061105000841/http://seqaxp.bio.caltech.edu/www/vms_beginners_faq.html


I can assure you that any such FAQ will also routinely be ignored too,
as will be the posting archives for this newsgroup, among other
resources.

Suggested reading from the OpenVMS manuals: the Users Guide manual, the
Programming Concepts manuals, and then either or both the OpenVMS
System Manager's Manuals and/or the OpenVMS Pascal docs.

In ancient times, what used to be the DEC "TIMA/STARS" support database
were also part of the usual path. Directly, or via llong-gone access
paths including the old AskQ site. VSI has a support database with
source code examples as well, but AFAIK they don't have that accessible
for non-contract customers.

There are source code postings in the archive of this comp.os.vms
newsgroup. Google Groups has a fast search of that, but recent years of
the Google newsgroup archives are filled with dreck and spam. There are
other less-searchable options including https://www.usenetarchives.com

https://www.digiater.nl/openvms/freeware/ (OpenVMS Freeware)

https://www.digiater.nl/openvms/decus/ (DECUS library)

https://www.eight-cubed.com/examples.shtml (C examples)

https://decuserve.org (resource info, "free shell" access to DCL on
OpenVMS Alpha, decades of DEC Notes conferences)
--
Pure Personal Opinion | HoffmanLabs LLC
Marc Van Dyck
2025-01-06 09:50:55 UTC
Reply
Permalink
Post by Arne Vajhøj
$ search sys$common:[syshlp.examples.pascal]*.pas varying
$ search sys$common:[syshlp.examples.pascal]*.pas "string("
Wow! That directory and the others around it are a real treasure trove.
While I haven't poked at the Pascal example code specifically (in the past
couple of decades), unfortunately most of the other example source code
examples included with OpenVMS itself also tended to be old, ill-maintained,
insecure, and/or buggy.
Various of the C code examples won't cleanly compile in recent decades, or
uses older or outdated APIs.
Decades ago, I tried to fix some of that mess, but other projects and other
funding priorities interceded.
I found answers to questions I had about calling RTL routines from Pascal.
Pascal is the proverbial deep end of the OpenVMS calling standard and
argument passing pool.
Usual path for figuring out the more obscure parts of Pascal argument passing
is the debugger, combined with the calling standard manual.
Write some code to call Pascal to Pascal for whatever argument-passing you
need, and use the debugger to reverse-engineer the descriptors used.
Is there some introduction to VMS that collects links to resources like
sys$common:[syshlp.examples] where VMS newbies can look to answer their own
questions?
Not that I've ever found. Most newbies don't do that. (And I write that as
somebody that worked on the OpenVMS FAQ, a document which was posted here
~monthly in decades past.) You are, however, doing far better than many of
the newbies over the decades, in that you're asking for these resources.
https://www.digiater.nl/openvms/freeware/v80/vmsfaq/vmsfaq.txt (with other
formats available)
https://web.archive.org/web/20061105000841/http://seqaxp.bio.caltech.edu/www/vms_beginners_faq.html
I can assure you that any such FAQ will also routinely be ignored too, as
will be the posting archives for this newsgroup, among other resources.
Suggested reading from the OpenVMS manuals: the Users Guide manual, the
Programming Concepts manuals, and then either or both the OpenVMS System
Manager's Manuals and/or the OpenVMS Pascal docs.
In ancient times, what used to be the DEC "TIMA/STARS" support database were
also part of the usual path. Directly, or via llong-gone access paths
including the old AskQ site. VSI has a support database with source code
examples as well, but AFAIK they don't have that accessible for non-contract
customers.
There are source code postings in the archive of this comp.os.vms newsgroup.
Google Groups has a fast search of that, but recent years of the Google
newsgroup archives are filled with dreck and spam. There are other
less-searchable options including https://www.usenetarchives.com
https://www.digiater.nl/openvms/freeware/ (OpenVMS Freeware)
https://www.digiater.nl/openvms/decus/ (DECUS library)
https://www.eight-cubed.com/examples.shtml (C examples)
https://decuserve.org (resource info, "free shell" access to DCL on OpenVMS
Alpha, decades of DEC Notes conferences)
There used to be a book from Digital Press named "programming OpenVMS
applications using Pascal" or something like that. Unavailable today
unless you manage to find a used copy, of course. But before its
publication, various versions of this book floated on the Digital
network. It was named "Pastools". I still have a hardcopy of that book,
version 0.9, so very close to the published version. Can electronic
versions of this book still be found somewhere ? It is a very valuable
resource for people who want to call system services from Pascal.
--
Marc Van Dyck
Craig A. Berry
2025-01-06 12:58:51 UTC
Reply
Permalink
Post by Marc Van Dyck
There used to be a book from Digital Press named "programming OpenVMS
applications using Pascal" or something like that. Unavailable today
unless you manage to find a used copy, of course. But before its
publication, various versions of this book floated on the Digital
network. It was named "Pastools". I still have a hardcopy of that book,
version 0.9, so very close to the published version. Can electronic
versions of this book still be found somewhere ? It is a very valuable
resource for people who want to call system services from Pascal.
I don't see that specific name, but the Internet Archive has a couple of
books on VAX Pascal:


<https://archive.org/details/stx_AA-L369B-TE_VMS_3.0_Programming_in_VAX_Pascal_Mar85>


<https://archive.org/details/vaxpascal0000hume>
Arne Vajhøj
2025-01-06 20:22:12 UTC
Reply
Permalink
Post by Marc Van Dyck
There used to be a book from Digital Press named "programming OpenVMS
applications using Pascal" or something like that. Unavailable today
unless you manage to find a used copy, of course. But before its
publication, various versions of this book floated on the Digital
network. It was named "Pastools". I still have a hardcopy of that book,
version 0.9, so very close to the published version. Can electronic
versions of this book still be found somewhere ? It is a very valuable
resource for people who want to call system services from Pascal.
Writing VAX/VMS Applications Using Pascal / Theo De Klerk from 1991.

Not available any longer. But still covered by copyright.

Arne
Arne Vajhøj
2025-01-06 20:28:38 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Marc Van Dyck
There used to be a book from Digital Press named "programming OpenVMS
applications using Pascal" or something like that. Unavailable today
unless you manage to find a used copy, of course. But before its
publication, various versions of this book floated on the Digital
network. It was named "Pastools". I still have a hardcopy of that book,
version 0.9, so very close to the published version. Can electronic
versions of this book still be found somewhere ? It is a very valuable
resource for people who want to call system services from Pascal.
Writing VAX/VMS Applications Using Pascal / Theo De Klerk from 1991.
35 years ago DEC had a training course "VMS for Programmers" with
a generic guide and a language specific workbook. They covered a
lot of LIB$ and SYS$ calls.

I think I still have my copy somewhere. But my workbook was the
Fortran edition - not the Pascal edition.

Arne
mjos_examine
2025-01-07 16:36:35 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Marc Van Dyck
There used to be a book from Digital Press named "programming OpenVMS
applications using Pascal" or something like that. Unavailable today
unless you manage to find a used copy, of course. But before its
publication, various versions of this book floated on the Digital
network. It was named "Pastools". I still have a hardcopy of that book,
version 0.9, so very close to the published version. Can electronic
versions of this book still be found somewhere ? It is a very valuable
resource for people who want to call system services from Pascal.
Writing VAX/VMS Applications Using Pascal / Theo De Klerk from 1991.
Not available any longer. But still covered by copyright.
You can click "Add to wishlist" here, and set yourself up to get
notified when a used copy eventually circulates through their system:
https://www.thriftbooks.com/w/writing-vaxvms-applications-using-pascal_theo-de-klerk/2874472/?resultid=e99ce148-01a9-4775-8291-a49c53dc349a#isbn=0139711775&edition=5374305

I've been successful doing that with some out-of-print book titles in
the past, after months, and even years, have gone by. It's always
a surprise when you suddenly get an email notification, and you can
defer your purchase decision to that point. There's no obligation to
acquire.
Craig A. Berry
2025-01-07 23:32:48 UTC
Reply
Permalink
Post by Arne Vajhøj
Writing VAX/VMS Applications Using Pascal / Theo De Klerk from 1991.
Not available any longer. But still covered by copyright.
It's available in a lot of libraries. WorldCat says 2 editions in 79
libraries:

https://search.worldcat.org/title/22709166
Arne Vajhøj
2025-01-07 23:54:41 UTC
Reply
Permalink
Post by Craig A. Berry
Post by Arne Vajhøj
Writing VAX/VMS Applications Using Pascal / Theo De Klerk from 1991.
Not available any longer. But still covered by copyright.
It's available in a lot of libraries. WorldCat says 2 editions in 79
https://search.worldcat.org/title/22709166
It is not available for sale.

There are obviously still copies around. And a really
well assorted library should have it.

Does the US have a rule that one copy of all published
books must go to Library of Congress?

(Denmark has a rule that a copy of all published books
in Denmark must go to both the State Library and
the Royal Library)

Arne
Lawrence D'Oliveiro
2025-01-08 02:27:34 UTC
Reply
Permalink
Does the US have a rule that one copy of all published books must go to
Library of Congress?
Only if you want to register the copyright. Copyright exists without
registration, but I think you cannot sue without registering.
Martin Vorländer
2025-01-04 12:41:31 UTC
Reply
Permalink
Post by Arne Vajhøj
https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Arne,

in your first example, the global variable declaration of v must come before
the procedure declaration of add_one_and_print.

cu,
Martin
John Reagan
2025-01-06 22:52:42 UTC
Reply
Permalink
     https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Arne
I'll look and give feedback.

John
John Reagan
2025-01-07 20:16:22 UTC
Reply
Permalink
Post by John Reagan
      https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
Arne
I'll look and give feedback.
John
For modern OpenVMS usage, you might want to discuss how to get 64-bit
pointers vs 32-bit pointers. C has the pointer_size pragma to modify
the "current pointer size". Pascal uses the [QUAD] attribute in front
of the pointer uparrow. There isn't a DCL qualifier (or module-level
attribute) to control the default of 32-bits. I'd add one now but who
would use it?

var
ptr64 : [quad] ^integer;
ptr32 : ^integer;

The compiler will call the appropriate Pascal RTL routine for NEW or
NEW64 based on the pointer's type.

As noted, QUADRUPLE is always 128-bits. With all the hassle with
missing support on x86, I should have added the equivalent of /L_DOUBLE
for Pascal (and others as well).

Yes, VARYING OF CHAR is a VAX Pascal V2.0 extension based highly on
PL/1's VARYING OF CHAR. I've seen comments hinting about an early form
of VARYING OF BITS as well but that was never added.

Extended Pascal's STRING type is modeled much on VAX Pascal's VARYING OF
CHAR. You can check the Extended Pascal's title page to see who was the
X3J9 Secretary at the time. 😉

The VARYING OF CHAR .BODY and .LENGTH are quite powerful especially when
you use them with IADDRESS. Along with the VAX Pascal V1 directives of
%IMMED, %REF, and %STDESCR (notice the parallel with Fortran?), you can
do many descriptor operations with ease.

STRING allows for a run-time length since it is an Extended Pascal
"schema" type. VARYING OF CHAR does not. We could have added that
feature to VARYING OF CHAR but we didn't.

We only added the Extended Pascal features that we thought were new and
interesting. For example, we didn't bother with Extended Pascal's
"complex" type. If you want a complex type, you code in Fortran as God
intended. We didn't add the EP direct access file syntax since the VAX
Pascal syntax provides the same feature set (guess where the feature set
came from). We also didn't add the EP module syntax which added
namespaces. (The PEN format actually has support for multiple name
spaces but the compiler doesn't take advantage of it).

The Pascal SDL backend was ever thought about 64-bit integers and such
since we wanted to keep as much recompile-and-go as possible.

Yes, the Pascal examples installed by the kit are a good resource. I
haven't updated them in quite a while. Perhaps it is time. Maybe I'll
do that when I finish the conversion to PCSI. Any suggestions?

I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
Dan Cross
2025-01-07 21:04:26 UTC
Reply
Permalink
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.

- Dan C.
John Reagan
2025-01-07 22:17:10 UTC
Reply
Permalink
Post by Dan Cross
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.
- Dan C.
Good question. My last email exchange with Theo was several years ago.
I suspect that Digital Press (or who ever bought all of their IP) would
still own the copyright to that version but could he provide an "almost
final draft" for some archive in much the same way the C/C++ standard
committees provide "drafts" of the standards to avoid copyright issues.
Dan Cross
2025-01-07 23:02:58 UTC
Reply
Permalink
Post by John Reagan
Post by Dan Cross
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.
Good question. My last email exchange with Theo was several years ago.
I suspect that Digital Press (or who ever bought all of their IP) would
still own the copyright to that version but could he provide an "almost
final draft" for some archive in much the same way the C/C++ standard
committees provide "drafts" of the standards to avoid copyright issues.
That would be very cool! There aren't that many books about
OpenVMS out there, it seems; even fewer about application
development. It would be great to have a few titles available.

- Dan C.
Arne Vajhøj
2025-01-08 00:00:47 UTC
Reply
Permalink
Post by Dan Cross
Post by John Reagan
Post by Dan Cross
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.
Good question. My last email exchange with Theo was several years ago.
I suspect that Digital Press (or who ever bought all of their IP) would
still own the copyright to that version but could he provide an "almost
final draft" for some archive in much the same way the C/C++ standard
committees provide "drafts" of the standards to avoid copyright issues.
That would be very cool! There aren't that many books about
OpenVMS out there, it seems; even fewer about application
development. It would be great to have a few titles available.
Once upon a time there were a reasonable number of of VMS books
available - including about development.

I have a list:
https://www.vajhoej.dk/arne/vms/books.html

But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).

Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?

Arne
Dan Cross
2025-01-08 13:08:29 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dan Cross
Post by John Reagan
Post by Dan Cross
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.
Good question. My last email exchange with Theo was several years ago.
I suspect that Digital Press (or who ever bought all of their IP) would
still own the copyright to that version but could he provide an "almost
final draft" for some archive in much the same way the C/C++ standard
committees provide "drafts" of the standards to avoid copyright issues.
That would be very cool! There aren't that many books about
OpenVMS out there, it seems; even fewer about application
development. It would be great to have a few titles available.
Once upon a time there were a reasonable number of of VMS books
available - including about development.
https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
That's a good question; I have no idea how large the audience
for such things would be, but I suspect it would be small.

However, there's something to be said for written materials that
are in the detail level somewhere between general programming
books about, say, a language or data structures or something,
and the reference manuals for the languages.

I don't think I'm saying anything novel here, but if authors and
publishers are willing to allow some of these older titles to be
distributed electronically, that can start to bridge that gap.

- Dan C.
Subcommandante XDelta
2025-01-08 22:59:59 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
Once upon a time there were a reasonable number of of VMS books
available - including about development.
https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
That's a good question; I have no idea how large the audience
for such things would be, but I suspect it would be small.
However, there's something to be said for written materials that
are in the detail level somewhere between general programming
books about, say, a language or data structures or something,
and the reference manuals for the languages.
I don't think I'm saying anything novel here, but if authors and
publishers are willing to allow some of these older titles to be
distributed electronically, that can start to bridge that gap.
- Dan C.
BTB, on Arne's list of VMS books, one, at least, should still be
commercially available:

Roland Hughes: The Minimum You Need to Know to Be an OpenVMS
Application Developer

https://www.theminimumyouneedtoknow.com/app_book.html

For years now the question has been surfacing in the OpenVMS community
"Where are the pimply faced kids?" The other situation which seems to
continually occur is a developer of one language suddenly finding
themselves having to modify or maintain an application written in a
language completely foreign to them...
:
:

Indeed, does anybody under sixty, follow comp.os.vms?
Arne Vajhøj
2025-01-09 00:23:20 UTC
Reply
Permalink
Post by Subcommandante XDelta
Post by Dan Cross
Post by Arne Vajhøj
Once upon a time there were a reasonable number of of VMS books
available - including about development.
https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
That's a good question; I have no idea how large the audience
for such things would be, but I suspect it would be small.
BTB, on Arne's list of VMS books, one, at least, should still be
Roland Hughes: The Minimum You Need to Know to Be an OpenVMS
Application Developer
https://www.theminimumyouneedtoknow.com/app_book.html
Yes. That one should still be available.
Post by Subcommandante XDelta
For years now the question has been surfacing in the OpenVMS community
"Where are the pimply faced kids?" The other situation which seems to
continually occur is a developer of one language suddenly finding
themselves having to modify or maintain an application written in a
language completely foreign to them...
Indeed, does anybody under sixty, follow comp.os.vms?
I would expect some.

If we say under fifty then I fear that inviting them all
for coffee would not require a large table.

Arne
Simon Clubley
2025-01-09 18:07:42 UTC
Reply
Permalink
Post by Subcommandante XDelta
Indeed, does anybody under sixty, follow comp.os.vms?
Yes.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
jayjwa
2025-01-09 19:47:44 UTC
Reply
Permalink
Post by Subcommandante XDelta
For years now the question has been surfacing in the OpenVMS community
"Where are the pimply faced kids?"
No one knows what it is, let alone how to use it. Thus, there is no
demand for it. How would a young guy, say 15 year's old, go about
getting his hands on it? It's not being taught in colleges anymore and you can't
legally get it at home. The products and licenses are laughably expensive,
especially when compared to other systems like Windows, Mac, and of
course Linux. Even when there was a real hobbyist program, it was very
restrictive. Expensive software running on expensive hardware might have
worked in the 1980s, but it doesn't work now. Unfortunately, the
business model wasn't updated to today's time. That is why there's no
new community members.

I was speaking to a well-known member of the community a few months
back on IRC, and even he said it was far easier and much, much cheaper to set
up a new server running something other than VMS. Even VSI's web server
runs on Ubuntu if I'm not mistaken.
Post by Subcommandante XDelta
Indeed, does anybody under sixty, follow comp.os.vms?
I lurk here and IRC 2600 #vms occasionally. Now that Google Groups is
dead, the place (and usenet itself) is usable again.
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Craig A. Berry
2025-01-10 02:14:05 UTC
Reply
Permalink
Post by jayjwa
Post by Subcommandante XDelta
For years now the question has been surfacing in the OpenVMS community
"Where are the pimply faced kids?"
No one knows what it is, let alone how to use it. Thus, there is no
demand for it. How would a young guy, say 15 year's old, go about
getting his hands on it?
Maybe apply for a community license?
Post by jayjwa
It's not being taught in colleges anymore and you can't
legally get it at home.
You certainly can get it at home, legally and for free. It's true that
it isn't much used in many of the places where it used to be ubiquitous,
including colleges and universities.
Post by jayjwa
The products and licenses are laughably expensive,
especially when compared to other systems like Windows, Mac, and of
course Linux. Even when there was a real hobbyist program, it was very
restrictive. Expensive software running on expensive hardware might have
worked in the 1980s, but it doesn't work now.
Exotic hardware is no longer necessary, and the software prices now are
a lot lower, adjusted for inflation, than they were 20, 30 or more years
ago. That doesn't mean it's cheap -- most commercial software isn't.
Post by jayjwa
Unfortunately, the
business model wasn't updated to today's time. That is why there's no
new community members.
Arguably it is the *new* business model, i.e., the time-limited
licenses, that make it harder for people to justify staying with VMS.
Post by jayjwa
I was speaking to a well-known member of the community a few months
back on IRC, and even he said it was far easier and much, much cheaper to set
up a new server running something other than VMS. Even VSI's web server
runs on Ubuntu if I'm not mistaken.
Post by Subcommandante XDelta
Indeed, does anybody under sixty, follow comp.os.vms?
I lurk here and IRC 2600 #vms occasionally. Now that Google Groups is
dead, the place (and usenet itself) is usable again.
Dave Froble
2025-01-09 00:09:31 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dan Cross
Post by John Reagan
Post by Dan Cross
[snip]
I have a copy of Theo De Klerk's book on my bookshelf. I did the
technical review of that book (wow, that is a long time ago!)
It looks like it would be a very nice reference; it's a that it
is no longer available. I wonder if the author retained rights,
or if those lie with Digital Press? If the former, perhaps the
electronic copy others mentioned might show up in the Internet
Archive's library or something similar.
Good question. My last email exchange with Theo was several years ago.
I suspect that Digital Press (or who ever bought all of their IP) would
still own the copyright to that version but could he provide an "almost
final draft" for some archive in much the same way the C/C++ standard
committees provide "drafts" of the standards to avoid copyright issues.
That would be very cool! There aren't that many books about
OpenVMS out there, it seems; even fewer about application
development. It would be great to have a few titles available.
Once upon a time there were a reasonable number of of VMS books
available - including about development.
https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
Arne
If a book has an electronic format, does it matter how many would purchase it?

Speaking of books, I have one that I may never have use for again:

VAX/VMS Internals and Data Structures
Ruth E. Goldenberg
Lawrence J. Kenah
Version 5.2

Also had an earlier version, but haven't seen it for some time ...
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Arne Vajhøj
2025-01-09 00:31:29 UTC
Reply
Permalink
Post by Dave Froble
Post by Arne Vajhøj
Once upon a time there were a reasonable number of of VMS books
available - including about development.
   https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
If a book has an electronic format, does it matter how many would purchase it?
The variable cost per copy would be very small (maybe only
the fee for processing payment).

But there is also fixed cost for distributing electronically.
Decide on what to do to prevent illegal copying. Generate the
file to distribute. Get it up on some e-commerce web site.
Not zero but not that expensive either. It would require a little
bit of sale though.

The problem will likely be that even if it would financially
be positive, then the amount would be very small. If the copyright
owner is an individual, then a plus of a few hundred or thousand
dollars will be OK. But if the copyright owner is
Big Mega Publishing Inc, then they will not do anything
with an expected profit under hundreds of thousands of dollars.

Arne
Dan Cross
2025-01-09 01:51:04 UTC
Reply
Permalink
Post by Arne Vajhøj
Post by Dave Froble
Post by Arne Vajhøj
Once upon a time there were a reasonable number of of VMS books
available - including about development.
   https://www.vajhoej.dk/arne/vms/books.html
But most of them are both not available for sale any longer
and not uptodate (either describe VMS VAX or VMS Alpha).
Probably not enough market today. How many would buy a book
about VMS Pascal development today? 25? 50? 100?
If a book has an electronic format, does it matter how many would purchase it?
The variable cost per copy would be very small (maybe only
the fee for processing payment).
But there is also fixed cost for distributing electronically.
Decide on what to do to prevent illegal copying. Generate the
file to distribute. Get it up on some e-commerce web site.
Not zero but not that expensive either. It would require a little
bit of sale though.
I think the hope is that the authors and/or publishers would
offer them gratis; there would be no need for working about
illegal copying, the content would simply be available as a
download (in PDF format presumably).
Post by Arne Vajhøj
The problem will likely be that even if it would financially
be positive, then the amount would be very small. If the copyright
owner is an individual, then a plus of a few hundred or thousand
dollars will be OK. But if the copyright owner is
Big Mega Publishing Inc, then they will not do anything
with an expected profit under hundreds of thousands of dollars.
Many technical books that previously cost rather tidy sums are
now available for free, as authors and publishers realized that
the audience had dwindled to negligible and there was no longer
a financial incentive to holding on to the IP.

It's kind of weirdly fascinating how thing that used to cost
staggering sums are now available just for free.

- Dan C.
Simon Clubley
2025-01-09 18:19:19 UTC
Reply
Permalink
Post by Dan Cross
Post by Arne Vajhøj
The problem will likely be that even if it would financially
be positive, then the amount would be very small. If the copyright
owner is an individual, then a plus of a few hundred or thousand
dollars will be OK. But if the copyright owner is
Big Mega Publishing Inc, then they will not do anything
with an expected profit under hundreds of thousands of dollars.
Many technical books that previously cost rather tidy sums are
now available for free, as authors and publishers realized that
the audience had dwindled to negligible and there was no longer
a financial incentive to holding on to the IP.
It's kind of weirdly fascinating how thing that used to cost
staggering sums are now available just for free.
Indeed.

About 20 years ago I found the VMS device drivers in C book in
a local large bookshop (either York or Leeds, I don't remember).

Such a thing would be utterly unheard of these days.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Simon Clubley
2025-01-10 13:25:13 UTC
Reply
Permalink
Post by Simon Clubley
Post by Dan Cross
Post by Arne Vajhøj
The problem will likely be that even if it would financially
be positive, then the amount would be very small. If the copyright
owner is an individual, then a plus of a few hundred or thousand
dollars will be OK. But if the copyright owner is
Big Mega Publishing Inc, then they will not do anything
with an expected profit under hundreds of thousands of dollars.
Many technical books that previously cost rather tidy sums are
now available for free, as authors and publishers realized that
the audience had dwindled to negligible and there was no longer
a financial incentive to holding on to the IP.
It's kind of weirdly fascinating how thing that used to cost
staggering sums are now available just for free.
Indeed.
About 20 years ago I found the VMS device drivers in C book in
a local large bookshop (either York or Leeds, I don't remember).
Such a thing would be utterly unheard of these days.
I was curious so I looked further and found the receipt still in the
book. I purchased it from Waterstones at 9-10 High Ousegate in York
on 26.06.01 at 16:05.

So, 20 years ago, you could purchase VMS Digital Press books directly
from a major high street bookseller. I also very strongly suspect it
was on the shelf in the shop because I would have used a more local
Waterstones if I was going to ask them to order it.

Wow. Dan is right. Things have certainly changed in 20 years!

BTW, according to the receipt I paid 34.99 UKP for it. I don't know
what that is today however.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2025-01-10 14:49:20 UTC
Reply
Permalink
Post by Simon Clubley
Post by Simon Clubley
About 20 years ago I found the VMS device drivers in C book in
a local large bookshop (either York or Leeds, I don't remember).
Such a thing would be utterly unheard of these days.
I was curious so I looked further and found the receipt still in the
book. I purchased it from Waterstones at 9-10 High Ousegate in York
on 26.06.01 at 16:05.
So, 20 years ago, you could purchase VMS Digital Press books directly
from a major high street bookseller. I also very strongly suspect it
was on the shelf in the shop because I would have used a more local
Waterstones if I was going to ask them to order it.
There may be another problem for VMS books hidden in that story.

The switch from "VT terminals connected to server" to "PC GUI talking
to servers" has killed the demand for VMS user books.

The decrease in number of VMS systems has hit demand for all VMS books
(system management, application programming, internals) hard.

But the changes in book distribution may also have hurt
sales of niche books like VMS books. Your book store actually
had a relative specialized VMS book in stock, because that
was expected of a serious book store. That was good for
sale, because there must have been thousands of book stores
world wide that bought one copy just to have one. In todays book
market I would expect Amazon to buy a couple of handfuls and
a few smaller online book sellers to buy a handful to have it
and then they will order more if the books starts to sell.

Arne

Arne Vajhøj
2025-01-09 00:35:11 UTC
Reply
Permalink
Post by Dave Froble
VAX/VMS Internals and Data Structures
Ruth E. Goldenberg
Lawrence J. Kenah
Version 5.2
Also had an earlier version, but haven't seen it for some time ...
There were at least:
* VMS VAX 4.4
* VMS VAX 5.2
* VMS Alpha 1.5

Not sure if there were for earlier VMS versions.

No:
* VMS Alpha 7.x (64 bit !)
* VMS Itanium

Question for Camiel: will you be writing the one for VMS x86-64 9.2?

:-)

Arne
Arne Vajhøj
2025-01-09 01:29:01 UTC
Reply
Permalink
Post by Arne Vajhøj
Question for Camiel: will you be writing the one for VMS x86-64 9.2?
We do plan to put out a white paper on some X86 changes related to
kernel mode
I/O work.
Specifically, the SVAPTE mechanism has been replaced with what we view
as a cleaner
mechanism for driver writers.
Which is good.

But also a bit less than a full IDS 9.2.

There are a lot of big changes between Alpha 1.5 and x86-64 9.2:
* the 64 bit changes in 7.x
* the Itanium changes in 8.x
* the x86-64 changes in 9.x

Obviously time is a constraint.

Arne
Simon Clubley
2025-01-09 18:24:46 UTC
Reply
Permalink
Post by Arne Vajhøj
* VMS VAX 4.4
* VMS VAX 5.2
* VMS Alpha 1.5
Not sure if there were for earlier VMS versions.
* VMS Alpha 7.x (64 bit !)
There was a memory or process supplement book published IIRC however.
Post by Arne Vajhøj
* VMS Itanium
Question for Camiel: will you be writing the one for VMS x86-64 9.2?
He and other VSI employees had previously said no to a full book but the
posting from Rob in this thread about a selective release of changes is
welcome news.

A couple of more realistic freely available drivers (instead of just
LRDRIVER) would also be welcome by anyone still writing VMS device drivers.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Arne Vajhøj
2025-01-09 19:40:44 UTC
Reply
Permalink
Post by Simon Clubley
Post by Arne Vajhøj
* VMS VAX 4.4
* VMS VAX 5.2
* VMS Alpha 1.5
Not sure if there were for earlier VMS versions.
* VMS Alpha 7.x (64 bit !)
There was a memory or process supplement book published IIRC however.
Yes.

OpenVMS Alpha Internals and Data Structures: Memory Management
Ruth Goldenberg
2002

<quote>
OpenVMS Alpha Internals and Data Structures: Memory Management is an update
to selected parts of the book OpenVMS AXP Internals and Data Structures
Version 1.5 (Digital Press, 1994). This book covers the extensions to
the memory management subsystem of OpenVMS Alpha to allow the operating
system and applications to access 64 bits of address space. It
emphasizes system data structures and their manipulation by paging and
swapping routines and related system services.

It also describes management of dynamic memory, such as nonpaged pool,
and support for nonuniform memory access (NUMA) platforms.
</quote>
Post by Simon Clubley
Post by Arne Vajhøj
* VMS Itanium
Question for Camiel: will you be writing the one for VMS x86-64 9.2?
He and other VSI employees had previously said no to a full book but the
posting from Rob in this thread about a selective release of changes is
welcome news.
Anything is good news.

Arne
Arne Vajhøj
2025-01-08 00:24:04 UTC
Reply
Permalink
Post by John Reagan
Post by John Reagan
      https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
I'll look and give feedback.
For modern OpenVMS usage, you might want to discuss how to get 64-bit
pointers vs 32-bit pointers.  C has the pointer_size pragma to modify
the "current pointer size".  Pascal uses the [QUAD] attribute in front
of the pointer uparrow. There isn't a DCL qualifier (or module-level
attribute) to control the default of 32-bits.  I'd add one now but who
would use it?
var
   ptr64 : [quad] ^integer;
   ptr32 :        ^integer;
The compiler will call the appropriate Pascal RTL routine for NEW or
NEW64 based on the pointer's type.
I have updated with a little section about this fun topic.

Arne
Arne Vajhøj
2025-01-08 00:45:44 UTC
Reply
Permalink
     https://www.vajhoej.dk/arne/articles/vmspascal.html
It is a "pre-release" - I am not sure I got it right.
So I would love some feedback.
And another one.

VMS Pascal modernization:
https://www.vajhoej.dk/arne/articles/vmspascalx.html

This is also VMS Pascal but a totally different angle.

This one covers how to integrate VMS Pascal application
with some of the newer technologies out there.

* writing JSON
* reading JSON
* calling RESTful web service using JSON/HTTP
* exposing RESTful web service using JSON/HTTP via GGI
* send JSON to and receive JSON from message queue
(tested with ActiveMQ on VMS)
* access MySQL running anywhere (tested with it on VMS)
* access databases running on Windows/Linux using
SQLRelay (tested with MS SQLServer, IBM DB2, Oracle DB,
MySQL and PostgreSQL on Windows)

Arne
Loading...