VMS: logicals UNIX: links, but...
Rahul Dhesi
dhesi at bsu-cs.bsu.edu
Fri Apr 21 04:56:21 AEST 1989
In article <810040 at hpsemc.HP.COM> gph at hpsemc.HP.COM (Paul Houtz) writes:
>The code I just ported was from an IBM System/34. It would have been
>easy to run the benchmark on a VMS system, because it has LOGICALS that
>are LOCAL to the user. It was a real PAIN because Unix doesn't. And
>in my opinion there is NO "badly" written code. There is only code
>that is less portable or less maintainable.
Seldom do we so so many rebuttable arguments in the same paragraph.
>The code I just ported was from an IBM System/34. It would have been
>easy to run the benchmark on a VMS system, because it has LOGICALS...
I assume "ported" in this context means "modified so it would run on a
new system". But the code did not run under UNIX. This means that
your port wasn't complete. You left the hard-coded filenames in. As
has been suggested before, removing them would have been fairly easy.
Don't blame the target system for not accepting code that isn't
correctly ported.
>It would have been
>easy to run the benchmark on a VMS system, because it has LOGICALS that
>are LOCAL to the user. It was a real PAIN because Unix doesn't.
It turns out that VMS has a clearly-defined syntax for its logical
names. (Well, precisely-defined, at least, if not very clearly.) A
logical name like ":yzzy:abc$^&*" will definitely not work. Your
program did not use filenames with such a syntax. Was it simply
coincidence that you (or the original programmer) used names that VMS
would accept? Now if you (or the original programmer) had indeed used
":yzzy:abc$^&*" as a filename, VMS would have choked on it but UNIX
would have handled it just fine. In that case could we then conclude
that VMS was broken and UNIX was perfect?
>...in my opinion there is NO "badly" written code. There is only code
>that is less portable or less maintainable.
It doesn't matter whether you classify the code that you were running
as badly-written, less portable, or less maintainable. Whichever it
was, it wasn't what UNIX was designed to run. Neither will UNIX
correctly run code like
#include stdio
main() {int i; i = SYS$QIO ( ... etc. ...); }
Not badly-written necessarily (VMS C being a different kettle of fish)
just not portable. And UNIX won't run this, thank heavens.
P.S. Just to make you think, try this with VMS C.
$ CC /standard /define=DEBUG /define=VMS /define=BIG myprog.c
(a) The switch /standard is interpreted to mean "don't check for
conformance to standard." (b) Only the last define has any effect.
--
Rahul Dhesi <dhesi at bsu-cs.bsu.edu>
UUCP: ...!{iuvax,pur-ee}!bsu-cs!dhesi
More information about the Comp.unix.questions
mailing list