I would never translate them to C/C++/Perl...
and the code I want to translate has MAT statements,

I want to move the code off of VMS to something useful.
I've pretty much settled on freepascal

HP Basic translator is discontinued and no longer available, so that's out.
And according to documentation it doesn't support MAT statements anyhow.

Using the Basic reference manual I found, it seems simple enough
to do the translations by hand to whatever language.
but I definitely won't be using C, C++, C# or Perl.

I''ll probably go with freepascal as I have tons of libraries I've written 
already.

Dan.


> To: [email protected]
> From: [email protected]
> Date: Wed, 5 Aug 2015 11:03:55 +0200
> Subject: Re: [Simh] off-topic basic translator
> 
> Sigh! Spelling is worse than normal this morning...
> 
> On 2015-08-05 10:58, Johnny Billquist wrote:
> > Not adressing Göra specifically.
> 
> "Göran".
> 
> > 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.
> 
> s/BAX/VAX/
> 
> > 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.
> 
> So I'm *not* surprised if you have problems finding any kind if 
> information around 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
> 
> Yay!
> 
>       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
> >>
> >
> >
> 
> 
> -- 
> Johnny Billquist                  || "I'm on a bus
>                                    ||  on a psychedelic trip
> email: [email protected]             ||  Reading murder books
> pdp is alive!                     ||  tryin' to stay hip" - B. Idol
> _______________________________________________
> 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