🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #55

Answer (GW-BASIC)

#55
From: Rob Cermak
Date: Wed, 08 Apr 1992 05:14
33 lines
1576 bytes
%%To: RPT378@MAINE.MAINE.EDU
%%Subject: Re: input mixed $ and real?
%%References: <92098.165112RPT378@MAINE.MAINE.EDU>

Try this basic program to put your file back together.
You will have to manipulate the X$ when you read your file however.

Since you are in GW-basic I will resort to line numbers (EEEK!)

10 OPEN"I",1,"<FILE IN QUESTION>"
20 OPEN"O",2,"<Recovered OUTPUT>"
25 REM ** Loop until end of file **
30 IF EOF(1) THEN GOTO 110        
35 LINE INPUT #1,X$
40 REM from this point on do what you need to do to the data using
50 REM MID$(x$,x,y) LEFT$(x$,x) RIGHT$(x$,x) INSTR(x$,x,y) and others
60 REM using a reference book of GW-Basic.  And re-write your 
70 REM results to another file.
80 REM You can replace LINE INPUT with D$=INPUT$(1,1) but this
90 REM will give you a character by character account of the file.
100 GOTO 20                    
110 CLOSE
120 END

Hope this helps!
Rob
-- 
---
Rob Cermak			        EMAIL : cermak@gandalf.rutgers.edu
Prog/Tech Rutgers-Cook College
FAX           : (908) 932-7922 		USMAIL: Rutgers University
Campus-Home   : (908) 745-0834			CPO 3212 PO BOX 700
Meteorology Dp: (908) 932-9387 			New Brunswick NJ 08903-0700
Technical Details
Message-ID: <Apr.8.01.14.39.1992.13557@gandalf.rutgers.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rutgers!rudy.rutgers.edu!gandalf.rutgers.edu!cermak

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rutgers!rudy.rutgers.edu!gandalf.rutgers.edu!cermak
From: cermak@gandalf.rutgers.edu (Rob Cermak)
Newsgroups: alt.lang.basic
Subject: Answer (GW-BASIC)
Keywords: GW-BASIC
Message-ID: <Apr.8.01.14.39.1992.13557@gandalf.rutgers.edu>
Date: 8 Apr 92 05:14:39 GMT
Distribution: usa
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 33