First Prigramming Assiment (qbasic)  | | |
August 30th, 2003, 08:50 PM
|
#1 (permalink)
| | Ultimate Member
Join Date: Jan 2003 Location: MA / NH
Posts: 1,497
| First Prigramming Assiment (qbasic)
My first project was to make a program in qbasic that will open a file with inventory records, and display the records, the on hand amount, value amount, on order amount and decription, and calculate the totals. This is what i got: (including comments)
BTW, the code didnt exactly copy and paste right..... so some of it may look weird.
***I got it to work thanks to rob riches code.....***
I need to make the program print if the person wants it to. I tried just copying the code and changeing print to lprint, but it doesnt work??
Any ideas?
Blaze
Last edited by Blazer06 : September 5th, 2003 at 07:46 PM.
|
| |
August 31st, 2003, 01:02 AM
|
#2 (permalink)
| | Banned
Join Date: Oct 2001
Posts: 447
|
**REMOVED***
keep posts short. Please don't be rude!! if you can't help or don't want to, then keep out of the thread.
KenKun/Moderator |
| |
August 31st, 2003, 05:34 AM
|
#3 (permalink)
| | Registered User
Join Date: Aug 2003 Location: SoCal
Posts: 28
| |
| |
August 31st, 2003, 08:53 AM
|
#4 (permalink)
| | Ultimate Member
Join Date: Jan 2003 Location: MA / NH
Posts: 1,497
|
Last edited by Blazer06 : August 31st, 2003 at 08:56 AM.
|
| |
August 31st, 2003, 08:55 AM
|
#5 (permalink)
| | Ultimate Member
Join Date: Jan 2003 Location: MA / NH
Posts: 1,497
|
qball, i didnt want others to do it for me, but to give me ideas on how i coul get my program to print.
I know my home work thats why I said ANY IDEAS not can somebody please make this work?
Please dont crap my thread.
My teacher told us that we can go out and ask for help. Because were ASKING not having otehrs do it. I dont nesiccarily want a full how to answer, just an idea of what i have to do. My teacher explained, that never would i have a job or project that i couldnt ask for help with, its not like im asking from point one "where do i begin" im asking "ideas to print since lprint isnt working..."
The code is there so people can see what im talking about and how the lprint doest work, because im not really good at explaining things.
Blaze |
| |
August 31st, 2003, 10:55 PM
|
#6 (permalink)
| | Banned
Join Date: Oct 2001
Posts: 447
|
Blazer06,
my bad, not trying to crap thread, trying to help. Quote: |
My teacher told us that we can go out and ask for help.
| fair enough. Quote: |
The code is there so people can see what im talking about and how the lprint doest work, because im not really good at explaining things.
| fair enough. But you posted 100 lines of code, and you are not explaining your problem well enough to determine WHERE in your 100 lines the problem is.
easier way is to get 10 line working, then add 10 more, then add 10 more....
then when 10 lines no workey, you've isolated problem to those 10 lines, post those, could be in business? |
| |
September 1st, 2003, 08:07 AM
|
#7 (permalink)
| | Member
Join Date: Oct 2001 Location: Belgium
Posts: 112
|
don't know for qbasic, but in powerbasic i used the following
open "lpt1:" for output as #1
print #1,"hello world"
close #1
__________________
Life Suxss...
|
| |
September 3rd, 2003, 12:37 AM
|
#8 (permalink)
| | Banned
Join Date: Oct 2001
Posts: 447
|
MrFreeze,
just to be a wisearse, but, does that work with USB printers? |
| |
September 3rd, 2003, 01:21 AM
|
#9 (permalink)
| | Anime Otaku
Join Date: Oct 2001 Location: Tampa, FL USA
Posts: 108,969
|
Well, this code example should work perfectly fine for all printers, USB included. Windows platform only, of course.
---------------
DATAFILE$ = "TEST.TXT"
OPEN DATAFILE$ FOR OUTPUT AS #1
PRINT #1, "Data "
CLOSE #1
SHELL "start /m wordpad /p TEST.TXT"
---------------
The SHELL command is the key to your situation. You can save the output data into a text file, then simply use WordPad with the /p convention to print the file. This should work with any printers installed to Windows.
I'll let you work out the other details, like storing the various pieces of data into the text file with the PRINT command.
BTW, it has been years since I've worked with Qbasic, so I am using the assumption that these commands will work, if my memory proves accurate.
Robert Richmond
__________________ Robert Richmond | TechIMO Community Relations Director
Infinite perceptions. One reality. FanFiction.Net - Unleash your imagination. |
| |
September 3rd, 2003, 03:42 AM
|
#10 (permalink)
| | Member
Join Date: Oct 2001 Location: Belgium
Posts: 112
|
as for usb printers, probably not, i dont have one to test it, google gives me:
1. Set the printer up and print a test page from Windows XP - Just to be sure.
2. Share the printer - like \\rod\usbprinter
3. Then use the printer - net use lpt3: \\rod\usbprinter
MrFreeze |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |