BBS: Inland Empire Archive Date: 02-27-93 (23:42) Number: 50 From: CASEY PEARSON Refer#: NONE To: RYAN PARK Recvd: NO Subj: LineLen 1.01 (Code) 1/2 Conf: (2) Quik_Bas
Here is a translation to C, as requested, but it's not a total
translation. The translator assumes certain BASIC statements are
structed a certain way, at an rate, you should be able to change where
noted, and go from there. Good luck.
BTW, the translator is called BASTOC and can be found here.
.....................................................
Init:
|
unknown statement type
GetName:
|
unknown statement type
IF FileName$ = "" GOTO NoName
|
numeric label expected
ON ERROR GOTO ErrName
|
numeric label expected
OPEN FileName$ FOR INPUT AS #1
|
expecting ','
DO UNTIL EOF(1)
|
unknown statement type
LOOP
|
unknown statement type
IF YorN$ = "Y" OR YorN$ = "y" THEN RUN ELSE SYSTEM
|
Expecting an expression
NoName:
|
unknown statement type
SYSTEM
|
unknown statement type
ErrName:
|
unknown statement type
GOTO NoName
|
numeric label expected
char *data_stmts[] =
{
0
};
extern RUN();
extern char *brd_line();
extern char *brd_str();
float ado;
float errname;
float filelen;
char * filename_;
float getname;
float init;
float loop;
float noname;
float system;
char * temp_;
char * yorn_;
static
Init:
|
unknown statement type
GetNachar nul_str[1] = {0};
main(argc, argv)
int argc;
char *argv[];
{
bio_init(argc, argv);
/*
Init:
|
unknown statement type
*/
bwr_set(1);
bwr_str("LineLen 1.01, Copyright 1992-1993, Ryan Park", 0);
bwr_nl();
bwr_set(1);
bwr_nl();
/*
GetNamme:
|
unknown statement type
IF FileName$ = "" GOTO NoName
e:
|
unknown statement type
*/
do {
bwr_prompt("Name of file to use
[D:\\DIR\\FILENAME.EXT:] ",1);
brd_set(0, 1);
filename_ = brd_str(filename_);
} while(brd_err());
if(-(s_comp(filename_,"")==0)) /*
IF FileName$ = "" GOTO NoName
|
numeric label expected
ON ERROR GOTO ErrName
|
numeric label expected
OPEN FileName$ FOR INPUT AS #1
|
expecting ','
|
numeric label expected
*/
/*
ON ERROR GOTO ErrName
|
numeric label expected
*/
/*
OPEN FileName$ FOR INPUT AS #1
|
expecting ','
*/
bwr_set(1);
bwr_nl();
bwr_set(1);
bwr_str(filename_, 0);
bwr_
DO UNTIL EOF(1)
|
unknown statement type
>>> Continued to next message
... þ SLMR 2.1a þ It's only a hobby ... only a hobby ... only a
--- DCQwk/T.A.G. 1.5a

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET