[comp.sys.next] Basic for NeXT

cyliao@hardy.u.washington.edu (Chun-Yao Liao) (11/20/90)

In article <11220@milton.u.washington.edu> cyliao@hardy.acs.washington.edu (Chun
-Yao Liao) writes:
>In article <1990Nov13.054856.2988@utstat.uucp> philip@utstat.uucnough) writes:

	notice these 

>Sort of.  There is a BASIC that comes a s an example of p2c translator.
>I guess it was a BASIC system written in pascal. The p2c translate the

>pascal source to C and compile it with cc.  Anyway, I didn't do any 
>"intensive" test to see if it's a "full" functionning BASIC, but I
>tried some simple program, and it worked.

The only problem I have with this is why would you want to translate?
If you are going to translate BASIC to Pascal and then to C, you kind of miss
the point of BASIC anyway (or one of the main points).  BASIC is interepreted
(usually).  No compile time. And you know where your errors are with your
code because it hangs at a specific, and known, line.  Translating to Pascal
preserves none of this.

	Ok, my fault, I went too quickly, what I was saing was that the basic
	system is written in Pascal.  The p2c uses it as an example
	to demonstrate the capability of p2c.  However, the running BASIC
	IS an interpreted basic system.

My purpose is not to flame.  Chun-Yao wanted to know if there was BASIC on the
NeXT.  Philip told him the closest thing he knew that ws available.  My 
	
	oops, a confusion here. It was Philip who wanted to know if there was
	BASIC on the NeXT, and I (Chun Yao) told him about the
	one comes with p2c.

cyliao@wam.umd.edu     		o NeXT :  I put main frame power on two chips.
      @epsl.umd.edu		o people: We put main flame power on two guys.
      @bagend.eng.umd.edu       o ::::::::::::::::::::::::::::::::::::::::::::
 xxxxx@xxxxx.xxx.xxx (reserved)	o RC + Apple // + Classic Music + NeXT = cyliao

glenn@heaven.woodside.ca.us (Glenn Reid) (11/21/90)

In article <11384@milton.u.washington.edu> cyliao@hardy.acs.washington.edu (Chun-Yao Liao) writes:
>>In article <1990Nov13.054856.2988@utstat.uucp> philip@utstat.uucnough) writes:

>>Sort of.  There is a BASIC that comes a s an example of p2c translator.
>>I guess it was a BASIC system written in pascal. The p2c translate the
>
>The only problem I have with this is why would you want to translate?
>If you are going to translate BASIC to Pascal and then to C, you kind of miss
>the point of BASIC anyway (or one of the main points).  BASIC is interepreted
>(usually).

The BASIC interpreter is written in Pascal.  Interpreters are programs,
too.  The p2c program translates the BASIC interpreter from Pascal to C,
but when you compile it in either language, it's still a BASIC interpreter.

Substitute a word like "spreadsheet" for "BASIC interpreter" if you still
don't get it.

Another way to look at it is that you get the source code to the BASIC
interpreter, and you can either leave it as Pascal source or translate
it to C source, but the code does the same thing in either case (acts
as a BASIC interpreter.

Pretty confusing, these languages within languages, eh?  Not to mention
that even the C source gets translated into 680x0 instructions before
you're done with it, which loses all of the advantages of BASIC :-)

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		PostScript/NeXT developers
 ..{adobe,next}!heaven!glenn		415-851-1785

dkoski@hercules.as.arizona.edu (David Koski) (11/27/90)

In article <328@heaven.woodside.ca.us> glenn@heaven.woodside.ca.us (Glenn Reid) writes:
>Pretty confusing, these languages within languages, eh?  Not to mention
>that even the C source gets translated into 680x0 instructions before
>you're done with it, which loses all of the advantages of BASIC :-)
>
>-- 
> Glenn Reid				RightBrain Software
> glenn@heaven.woodside.ca.us		PostScript/NeXT developers
> ..{adobe,next}!heaven!glenn		415-851-1785

Even better, these 680x0 instructions are interpreted by microcode on the chip!
Thats right, your machine language programs are interpreted!

David Koski