<s>
Wang	B-Language
BASIC	I-Language
is	O
a	O
series	O
of	O
BASIC	B-Language
programming	I-Language
languages	I-Language
for	O
computers	O
from	O
Wang	O
Laboratories	O
.	O
</s>
<s>
The	O
term	O
can	O
be	O
used	O
to	O
refer	O
to	O
the	O
BASIC	O
on	O
any	O
Wang	O
machine	O
,	O
but	O
is	O
mostly	O
associated	O
with	O
the	O
versions	O
on	O
the	O
Wang	B-Language
2200	I-Language
minicomputer	B-Architecture
series	O
of	O
the	O
early	O
1970s	O
.	O
</s>
<s>
Wang	O
offered	O
several	O
models	O
of	O
each	O
version	O
of	O
the	O
2200	O
series	O
,	O
differing	O
only	O
in	O
the	O
amount	O
of	O
microcode	B-Device
stored	O
in	O
read-only	B-Device
memory	I-Device
(	O
ROM	B-Device
)	O
,	O
and	O
thus	O
the	O
number	O
of	O
commands	O
available	O
in	O
BASIC	O
on	O
that	O
machine	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
B	O
model	O
machines	O
differed	O
from	O
the	O
base-model	O
A	O
by	O
doubling	O
the	O
ROM	B-Device
and	O
using	O
that	O
to	O
store	O
a	O
variety	O
of	O
input/output	B-General_Concept
and	O
file	O
management	O
commands	O
.	O
</s>
<s>
Wang	B-Language
BASIC	I-Language
closely	O
followed	O
the	O
original	O
Dartmouth	B-Language
BASIC	I-Language
in	O
syntax	O
,	O
but	O
was	O
an	O
interpreter	B-Application
as	O
opposed	O
to	O
a	O
compile-and-go	O
system	O
.	O
</s>
<s>
It	O
lacked	O
many	O
features	O
common	O
to	O
later	O
dialects	O
like	O
Microsoft	B-Language
BASIC	I-Language
,	O
but	O
many	O
of	O
these	O
features	O
were	O
added	O
in	O
BASIC-2	O
.	O
</s>
<s>
Not	O
all	O
of	O
the	O
instructions	O
listed	O
below	O
would	O
be	O
available	O
in	O
the	O
base	O
model	O
;	O
2200B	O
and	O
C	B-Language
added	O
dozens	O
of	O
new	O
keywords	O
,	O
and	O
are	O
outlined	O
separately	O
below	O
.	O
</s>
<s>
The	O
original	O
Wang	B-Language
BASIC	I-Language
for	O
the	O
2200	O
is	O
a	O
relatively	O
standard	O
version	O
of	O
the	O
Dartmouth	B-Language
BASIC	I-Language
concept	O
,	O
and	O
will	O
be	O
familiar	O
to	O
users	O
of	O
any	O
common	O
BASIC	O
interpreters	B-Application
like	O
Microsoft	B-Language
BASIC	I-Language
.	O
</s>
<s>
Like	O
most	O
BASIC	O
interpreters	B-Application
,	O
Wang	B-Language
BASIC	I-Language
operated	O
in	O
immediate	B-Application
mode	I-Application
or	I-Application
program	I-Application
mode	I-Application
,	O
switching	O
to	O
the	O
later	O
when	O
a	O
line	O
number	O
is	O
seen	O
at	O
the	O
start	O
of	O
the	O
line	O
when	O
the	O
(	O
return	O
)	O
key	O
is	O
pressed	O
.	O
</s>
<s>
saved	O
the	O
current	O
program	O
to	O
cassette	B-Device
and	O
read	O
it	O
back	O
in	O
.	O
</s>
<s>
would	O
read	O
over	O
the	O
next	O
two	O
files	O
found	O
on	O
the	O
cassette	B-Device
tape	I-Device
,	O
and	O
then	O
stop	O
,	O
allowing	O
a	O
subsequent	O
or	O
to	O
work	O
on	O
the	O
third	O
file	O
.	O
</s>
<s>
One	O
limitation	O
of	O
Wang	B-Language
BASIC	I-Language
,	O
as	O
in	O
the	O
case	O
of	O
the	O
original	O
Dartmouth	O
as	O
well	O
,	O
is	O
that	O
the	O
THEN	O
clause	O
of	O
an	O
IF	O
statement	O
could	O
only	O
be	O
a	O
line	O
number	O
,	O
in	O
contrast	O
to	O
more	O
modern	O
dialects	O
that	O
allow	O
any	O
statement	O
after	O
the	O
THEN	O
.	O
</s>
<s>
In	O
common	O
with	O
other	O
"	O
high	O
end	O
"	O
BASICs	O
of	O
the	O
era	O
,	O
Wang	B-Language
BASIC	I-Language
offered	O
formatted	O
output	O
with	O
and	O
a	O
separate	O
"	O
image	O
"	O
.	O
</s>
<s>
In	O
contrast	O
to	O
later	O
BASICs	O
which	O
used	O
dynamic	O
length	O
strings	O
on	O
a	O
heap	O
,	O
like	O
Microsoft	O
,	O
Wang	B-Language
BASIC	I-Language
set	O
all	O
strings	O
to	O
a	O
default	O
length	O
of	O
16	O
characters	O
and	O
would	O
ignore	O
any	O
characters	O
assigned	O
beyond	O
that	O
.	O
</s>
<s>
Unused	O
characters	O
at	O
the	O
end	O
of	O
a	O
string	O
were	O
filled	O
with	O
space	O
characters	O
,	O
and	O
any	O
trailing	O
spaces	O
were	O
ignored	O
in	O
PRINT	O
statements	O
,	O
which	O
is	O
another	O
potential	O
source	O
of	O
problems	O
when	O
porting	O
code	O
to	O
Wang	B-Language
BASIC	I-Language
.	O
</s>
<s>
In	O
keeping	O
with	O
the	O
Dartmouth	O
model	O
,	O
Wang	B-Language
BASIC	I-Language
included	O
statements	O
for	O
storing	O
constants	O
within	O
the	O
program	O
code	O
,	O
and	O
these	O
were	O
read	O
using	O
the	O
statement	O
,	O
which	O
started	O
at	O
the	O
first	O
data	O
element	O
and	O
then	O
moved	O
a	O
pointer	O
forward	O
to	O
the	O
next	O
element	O
with	O
every	O
READ	O
.	O
</s>
<s>
In	O
Wang	B-Language
BASIC	I-Language
,	O
this	O
was	O
accomplished	O
with	O
the	O
and	O
statements	O
.	O
</s>
<s>
The	O
original	O
Wang	B-Language
BASIC	I-Language
came	O
in	O
several	O
versions	O
differing	O
in	O
the	O
amount	O
of	O
ROM-based	O
microcode	B-Device
,	O
and	O
thus	O
the	O
number	O
of	O
keywords	O
supported	O
.	O
</s>
<s>
The	O
additions	O
can	O
generally	O
be	O
classed	O
into	O
four	O
categories	O
;	O
missing	O
features	O
,	O
additional	O
string	O
commands	O
,	O
vector-like	O
commands	O
,	O
and	O
input/output	B-General_Concept
.	O
</s>
<s>
read	O
a	O
character	O
from	O
the	O
keyboard	O
without	O
pausing	O
,	O
similar	O
to	O
in	O
MS	B-Language
BASIC	I-Language
.	O
</s>
<s>
Dartmouth	B-Language
BASIC	I-Language
included	O
a	O
CHANGE	O
command	O
but	O
it	O
was	O
very	O
different	O
in	O
purpose	O
,	O
in	O
Dartmouth	O
,	O
would	O
produce	O
an	O
array	O
of	O
values	O
in	O
B	O
,	O
with	O
each	O
element	O
containing	O
the	O
ASCII	O
code	O
for	O
the	O
corresponding	O
character	O
in	O
A$	O
;	O
in	O
this	O
case	O
,	O
B	O
would	O
contain	O
49	O
,	O
50	O
,	O
51	O
,	O
52	O
,	O
46	O
,	O
53	O
,	O
the	O
ASCII	O
values	O
for	O
the	O
characters	O
"	O
1234.5	O
"	O
.	O
</s>
<s>
Wang	O
's	O
CONVERT	O
also	O
had	O
a	O
second	O
mode	O
that	O
took	O
a	O
format	O
specifier	O
like	O
PRINTUSING	O
and	O
used	O
that	O
to	O
convert	O
a	O
number	O
to	O
a	O
formatted	O
string	O
in	O
a	O
fashion	O
analogous	O
to	O
C	B-Language
's	O
sprintf	O
.	O
</s>
<s>
The	O
majority	O
of	O
the	O
additions	O
in	O
2200B	O
were	O
related	O
to	O
input/output	B-General_Concept
,	O
and	O
mostly	O
to	O
working	O
with	O
floppy	O
disk	O
files	O
.	O
</s>
<s>
Later	O
models	O
in	O
the	O
series	O
added	O
some	O
or	O
all	O
of	O
the	O
commands	O
in	O
the	O
B	O
or	O
C	B-Language
versions	O
,	O
but	O
only	O
the	O
2200T	O
expanded	O
on	O
them	O
.	O
</s>
<s>
Most	O
notable	O
in	O
the	O
expansions	O
was	O
the	O
addition	O
of	O
matrix	O
math	O
,	O
but	O
a	O
few	O
I/O	B-General_Concept
details	O
were	O
also	O
added	O
.	O
</s>
<s>
The	O
matrix	O
math	O
commands	O
were	O
largely	O
identical	O
to	O
those	O
found	O
in	O
later	O
releases	O
of	O
Dartmouth	B-Language
BASIC	I-Language
.	O
</s>
<s>
For	O
instance	O
,	O
would	O
produce	O
a	O
matrix	O
A	O
whose	O
elements	O
were	O
the	O
sums	O
of	O
the	O
corresponding	O
elements	O
in	O
matrix	O
B	O
and	O
C	B-Language
.	O
Other	O
matrix	O
commands	O
include	O
ert	O
,	O
for	O
the	O
identity	O
matrix	O
and	O
for	O
the	O
zero	O
matrix	O
,	O
and	O
various	O
utilities	O
like	O
,	O
,	O
and	O
.	O
</s>
<s>
The	O
introduction	O
of	O
the	O
2200VP	O
's	O
completely	O
new	O
instruction	B-General_Concept
set	I-General_Concept
required	O
an	O
entirely	O
new	O
BASIC	O
to	O
be	O
written	O
from	O
scratch	O
.	O
</s>
<s>
While	O
backward	B-General_Concept
compatibility	I-General_Concept
was	O
the	O
primary	O
goal	O
,	O
the	O
new	O
BASIC-2	O
also	O
added	O
a	O
number	O
of	O
missing	O
features	O
.	O
</s>
<s>
The	O
most	O
notable	O
change	O
was	O
that	O
BASIC	O
was	O
no	O
longer	O
stored	O
in	O
read-only	B-Device
memory	I-Device
(	O
ROM	B-Device
)	O
and	O
was	O
instead	O
loaded	O
from	O
disk	O
at	O
boot	O
time	O
,	O
which	O
allowed	O
it	O
to	O
be	O
easily	O
patched	O
in	O
the	O
field	O
to	O
fix	O
bugs	O
.	O
</s>
<s>
In	O
March	O
1977	O
,	O
Wang	O
announced	O
an	O
expanded	O
version	O
of	O
the	O
VP	O
system	O
that	O
included	O
more	O
memory	O
,	O
up	O
to	O
256KB	O
,	O
and	O
a	O
terminal	B-Device
server	I-Device
system	O
to	O
allow	O
a	O
single	O
machine	O
support	O
up	O
to	O
twelve	O
terminals	O
.	O
</s>
<s>
On	O
2	O
April	O
1981	O
,	O
at	O
the	O
Hannover	O
Fair	O
,	O
Wang	O
announced	O
a	O
major	O
update	O
of	O
the	O
MVP	O
series	O
microcode	B-Device
.	O
</s>
<s>
The	O
$	O
2,000	O
"	O
C	B-Language
"	O
option	O
added	O
a	O
COBOL	B-Application
compiler	O
as	O
well	O
as	O
a	O
further	O
updated	O
version	O
of	O
BASIC	O
,	O
BASIC-3	O
.	O
</s>
