You are here:

Qbasic, Quickbasic/geting data from text file of purchase bill/invoice


Theunis wrote at 2014-12-09 08:33:01
This has all the indications of a RANDOM file

Has the original QBASIC program gone missing?

Are you trying to read the DATA using another Prog.

Are your headings all correct? viz Invoice no.  Invoice Date.  Item code...etc

If the headings are all correct then you can use Wordpad  to open the file - Set View to No Wrap (under options.  You will see what you quoted is actually three records starting with InvoiceNo/InvoiceDate and ending with V20/11/2014.

Try to type the heading above each item or as in the first item it is actually two.

If you know what each item is in respect of and you know its length then you can then set up the TYPE..END TYPE and read it in as a RANDOM OR BINARY file

Qbasic, Quickbasic

All Answers

Ask Experts


Alex Barry


I have been a qbasic programmer since 2000, creating games, minor libraries and various small programs. I have experience using interrupts, graphics, file input/output, the mouse cursor, and using libraries. I have also learned FreeBASIC, QB64, c/c++, python, lua, php and html.
I do not claim to be an absolute authority in any language, but I don't mind looking things up and learning with you.


I have been programming in *Basic dialects since 2000, as mentioned in my expertise. After a year of QBasic, I learned C and C++, and dabbled a little in ASM (I don't program in ASM - I literally just played around to see how things work). When QB64 and FreeBASIC were released, I played with those languages. At the time, FreeBASIC offered more functionality and I sided with that language for a while. During that time, while I was learning new languages, that I would see what scripting languages are available, where I took up python and lua. I started to notice a staleness to QB64's development (which I kept tabs on from time to time), and am now trying to be active in it's community and maybe in it's development in the future. Currently, I am only active on the forums, but I appear on occasion on's forums as well.

Highschool - 2007

©2017 All rights reserved.