🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5152

basic to pascal (mks$ in particular)

#5152
From: Bruce Leung
Date: Tue, 12 Mar 1991 20:30
31 lines
1706 bytes
I'm trying to read a data file that was written using the mks$ function
in Basic.  Actually, I assume it was written using that since the only
code I have is a Basic program to read the file (shown below).

My question - how can I read this file using Turbo Pascal?  I last used
Basic about 10 years ago and I'm not very familiar with it.  I'm not
terribly familiar with Turbo Pascal either but that's the language my
friend wants it in.

I'll take Pascal or C code or the format that Basic uses to encode a
single precision number in 4 bytes.  Or any other clues anyone cares to
give.  (Though I would prefer Turbo Pascal clues! :-))

Thanks,
	Bruce

Basic program fragment to display data file:

120 OPEN "R",1,"C:\DATA\F7.DAT",20
130 FIELD 1,4 AS DT$,4 AS HIGH$,4 AS LOW$,4 AS CLSE$,4 AS VOL$
...
220 FOR LOOP = 2 TO NUMRECS
230 GET 1, LOOP
240    PRINT LOOP; TAB(10)
250    PRINT CVS(DT$); TAB(20)
250    PRINT CVS(HIGH$); TAB(30)
etc.

-----------------------------------------------------------------------------
Bruce Leung    bleung@uiuc.edu | Women and cats do as they damn well please.
University of Illinois         | Men and dogs had best learn to live with it.
Technical Details
Message-ID: <1991Mar12.203014.14472@csrd.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!sp1.csrd.uiuc.edu!leung

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!rutgers!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!sp1.csrd.uiuc.edu!leung
From: leung@sp1.csrd.uiuc.edu (Bruce Leung)
Newsgroups: comp.os.msdos.programmer
Subject: basic to pascal (mks$ in particular)
Summary: how to read 4 byte single precision number
Message-ID: <1991Mar12.203014.14472@csrd.uiuc.edu>
Date: 12 Mar 91 20:30:14 GMT
Sender: news@csrd.uiuc.edu (news)
Distribution: na
Organization: Center for Supercomputing R&D, U. of Ill.
Lines: 31