No offence taken!

I'm fully aware that DEC-Basic not equals GW-basic, but I'd guess the similarities between DEC-Basic and QB-64 really are larger than those between DEC-basic and Pascal / C / C++ / Perl / ... (Please note that QB-64 seems to be a quite modern BASIC, but still compatible with older MS-basic. Please also note that I prefer Pascal rather than BASIC ;-)

More similar should mean less complicated to translate in my humble opinion!

If I'm not mistaken, the QB-64 seems to be a translator from Basic to C++ (from reading the "Linux-requirements" for it), and if writing a Basic--> ? - translator, is on the table, it might be less work to start with one working translator and improve it from taking GW-basic source into taking DEC-Basic... (or having a flag/option for it?)

This written just to bring some ideas to discuss into the air.

Göran

On 2015-08-05 10:58, Johnny Billquist wrote:
Not adressing Göra specifically.

VAX Basic is not like GW-BASIC. I suspect the differences are large enough that we could almost call it two different programming languages...

Anyway, I'm confused by this whole thread.

First of all, VAX Basic is still around. But you still need VMS. I think it's called HP Basic nowadays. The naming went: BAX Basic -> DEC Basic -> COMPAQ Basic (I suspect) -> HP Basic. But the OP asked for something for VMS. So he should be good, and there is no need to do anything. The hobbyist program covers hobby use, so you can get a license, install it, and be happy. No money involved.

You should be able to find some info you you just manage to locate the VMS information at HP. HP is confused, so I'm surprised if you have problems finding any kind of information there.

Second - translating stuff from VAX Basic to C++ - I fail to see the problem. Normal strings in VAX Basic are dynamic. std::string should fit the bill perfectly. Strings in MAPs are static in size and location. No different than a char [] in C or C++. MAP statements as such are actually pretty much a 1:1 mapping to a static defined struct in C or C++. If you want to do I/O related to a MAP, you'll just do the I/O to the static struct instead, and you're there. COMMONs are the same thing as MAPs, so the same static structs in C work for those too.

For strings, you will need some special assignment and compare operators to make it work identical. In VAX Basic, an assignment to a static string (such as in a MAP) will pad the string with spaces at the end. And there are two string comparators. The normal equal operation will consider two strings to be equal even if there are different trailing spaces on either or both strings. There is a second string compare operator if you want to check for exact equality, including string length and trailing spaces.

The FIELD statement is just some more data shuffling related to I/O. Nothing difficult about it.

MAT statements is something I would skip, as that is more complex, but seldom used.

I think that error handling would be a rather difficult part in any translation, though. I don't even care to go into that story here.

But the things other have mentioned, I've touched on above, and they are not hard to translate for the most part. But Perl would *not* be a language I would translate to.

    Johnny

On 2015-08-05 08:33, Göran Åhling wrote:


Den 2015-08-04 kl. 17:52, skrev Dan Gahlinger:
Does anyone have or know where I can get a copy of the Vax Basic
translator?
Especially for VMS or windows or something?

I'd like to convert my old Vax Basic programs to something usable on
modern systems,
but while Vax Basic is simple enough there are a few things I have
trouble with,
such as MAP statements, records, etc.

If "modern systems" is included in the set of {Win; Mac OSX; Linux;
Android}, why not stay BASIC?
http://www.qb64.net/
I have used it to make old GW-basic-programs usable in a PC of today
(ie. >= Win 7).

The snag was to run an old GW-basic, load the program into it, and then
save the program using Ascii-mode, to get a file that QB64 can load.
(Actually a file that looks like a LIST print-out, as opposed to the
GW-basic native format)

It is described in Microsoft Knowledge base: Article ID: 80745

I was astonished how much of structural-programming possibilities and
support that has been put into this modern BASIC, the step from "old
days" style that was more close to Fortran-4 is immense! It can
definitively be used to write "Pascal-looking" programs.

In my case, one of the programs I converted didn't work properly, so I
ended up correcting it - taking all line-numbers away was a great start,
as the problem was hidden in GOTO:s by the original author...

Besides from using the QB-64 once, I have no hooks to it or to its
development...

/Göran

I've tried looking on the HP/etc sites and it seems it's been
discontinued,

does anyone have a copy I can use, or know where I can get one?

I don't want to pay for a product, as this is just hobbyist use for
personal programs I wrote

thanks

Dan.


_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh



_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh




_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to