Article View: alt.lang.basic
Article #313Re: VAX Basic-like Basic for PC?y
From: dobrien
Date: Tue, 17 Nov 1992 17:14
Date: Tue, 17 Nov 1992 17:14
159 lines
7128 bytes
7128 bytes
In article <1992Nov14.063223.11096@nntpd2.cxo.dec.com>, roth@csoadm.enet.dec.com (Lee Roth) writes:
>
> Any suggestions as to which PC Basic would fill the following requirements?
>
> 1) Compiler to produce standalone runnable programs (no interpreter baggage,
> please!)
>
> 2) Program lines without numbers
>
> 3) Can label sections of code and use GOTO or GOSUB label instead of
> line numbers
>
> 4) Variable names of at least 12 characters (so you can understand them)
>
> 5) 'Option explicit' so you can force declaration of variables when coding
>
> 6) Decent ON ERROR handling
>
> 7) Select/case statements, VAX Basic-ish, e.g.
>
> Select stooge$
>
> case = "MOE"
> print "Has sugarbowl haircut"
>
> case = "LARRY"
> print "A FINE fellow!"
>
> case = "CURLEY"
> print "Nuk! Nuk! Ooooow!"
>
> case else !don't like SHEMP
> print stooge$ + " is not a valid STOOGE!"
>
> end select
>
> (yea, I know I'm dreaming on this one...)
>
>
> 8) ISAM file support
>
> 9) Can use all of the memory available; i.e. don't want nasty restrictions
> on program size.... I'm not talking about HUGE programs but I don't
> want to have to be terribly restricted either.
>
> Also, don't need any windows support- just plain vanilla ASCII character
> terminal I/O type stuff.
>
> My experience with Basic in the PC arena is zilch as you can tell.
>
> Thanks in advance for any suggestions/caveats you may have...
>
> Lee Roth
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Lee Roth N8JQY Digital Equipment Corporation
> roth@csoadm.enet.dec.com
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
As far as answering most of your queries go, I am presently using Microsoft
QuickBasic, which seems to match most of the things you ask for (but not
all). You may correct me on any of these points, since my PC experience is
rather limited. I am currently programming in microsoft BASIC, and have
written programs in VAX BASIC as well.
First, as far as the BASIC languages go, there is no match for VAX BASIC,
so far as I know. Quick BASIC, and Turbo BASIC, come close. I know nothing
about Turbo (made by Borland). Anyway, after being used to VAX, don't
expect perfection.
As far as point 1) is concerned, Microsoft QuickBASIC (which I also call
QBASIC) (and all the other ones) have a compiler. GWBASIC may add it optionally.
2) Microsoft can run without line numbers, and can even use statement
labels instead. i.e., "Exit0:" is a valid line number; so is
"StoogeCase:" for your case statement. The colon ":" is a line separator
in case you wish to place a command on that line. You can separate
statements with a ":" as well. A for/next loop can be written on a
single line this way.
3) See 2).
4) Microsoft has 40 characters as a minumum. "AlmostButNotQuiteDone" is a
valid variable, procedure or function name. Microsoft also doesn't ruin
the appearance of the above variable name by converting everything to
capital letters. Your variable names are as you typed them.
5) I have been trying to find out if Microsoft can do this. The jury is
still out on that one. I know that you can make explicit type
declarations, i.e. (not sure of the syntax or wording)
type date
day as integer
month as string * 15 ' This makes a fixed-length string,
' which is always padded with blanks.
year as integer
result as double ' Double-precision real number
end type
dim ExpiryDateResult(30) as date
As for declaring variables other than arrays, I am not clear on. It
seems as though this is only good for arrays, unless someone can correct
me on this. The result here is a record varible, not exactly what you
wanted. (Record variables are also supported in VAX). A simpler one is:
type people
name as string * 40
end type
dim NameOfSomeGuy(1) as people
Still a pain because it has a subscript, and must be used in the
program as: NameOfSomeGuy(1).name, example:
NameOfSomeGuy(1).name = "Henry J. Q. Glick"
Note the absence of a $ in all of this.
6) I am satisfied with its ON ERROR capabilities, though not as glorious as
VAX, I'm afraid.
7) Microsoft has select case, but you must use:
SELECT CASE stooge$
CASE "Curly": DoGodKnowsWhatProcFunctOrSubroutine
.
.
CASE else: GiveUpAndGoHome
END SELECT
8) Sorry. Don't know what that is.
9) No luck here. As far as I know Microsoft still uses 64K of memory, as
well as all other BASIC versions I know of on the PC.
10)Well, Microsoft is a window-type program. It does not require a mouse,
but is very straightforward with or without one. I do not use a mouse.
I rarely use the pulldown menus except to print, reset, or exit. Among
its "window" options are a debugger. Use the "ALT" key for the menu.
VAX BASIC cannot use a window, because it doesn't want to waste its
time deciding what terminal you're on and figuring out what escape codes
your terminal will understand, since VAX is designed to run on all
terminals, and all terminals are different. I therefore consider
QBASIC's widow to be an advantage over VAX. QBASIC knows you are on a PC
and all PC's behave similarly. You can jump out of the
editor to immediate mode and back again by pushing F6. And
both the editor and immediate mode are on the same screen in QBASIC.
This also enables you to cut and paste from the editor to immediate mode
and vice versa, so that you can try out commands exactly as you had typed
them in you program; or try out a command in the program exactly as you
had typed it in immediate mode. This is impossible in VAX, since the
editor and the interpreter (Immediate mode) are separate animals.
The QBASIC editor checks for syntax as you edit; VAX does not.
Microsoft allows you to shell to DOS and back again, and allows you to
perform DOS commands using the SHELL command.
also has the DATE$, TIME$ commands. QBASIC allows you to reset these
on you PC using SHELL (try that on your VAX).
Good luck in finding a Dos-BASIC product. QBASIC is strongly recommended.
Cheers!
paulk@odie.cs.mun.ca
Use the above email address when responding, since that is my own account.
Technical Details
Message-ID:
<1992Nov17.144436.1@kean.ucs.mun.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!van-bc!cs.ubc.ca!utcsri!newsflash.concordia.ca!nstn.ns.ca!news.ucs.mun.ca!kean.ucs.mun.ca!dobrienReferences:
<1992Nov14.063223.11096@nntpd2.cxo.dec.com>Show Full Headers
Complete Article Headers
Newsgroups: alt.lang.basic Path: arc1-ca.pugleaf.net!sparky!uunet!van-bc!cs.ubc.ca!utcsri!newsflash.concordia.ca!nstn.ns.ca!news.ucs.mun.ca!kean.ucs.mun.ca!dobrien From: dobrien@kean.ucs.mun.ca Subject: Re: VAX Basic-like Basic for PC?y Message-ID: <1992Nov17.144436.1@kean.ucs.mun.ca> Lines: 159 Sender: usenet@news.ucs.mun.ca (NNTP server account) Organization: Memorial University. St.John's Nfld, Canada References: <1992Nov14.063223.11096@nntpd2.cxo.dec.com> Date: Tue, 17 Nov 1992 17:14:36 GMT