»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 08-30-2003, 05:50 PM   #1 (permalink)
Registered User
 
Join Date: Jan 2003
Location: Orange, Mass.
Posts: 490
Blazer06 is on a distinguished road
Send a message via AIM to Blazer06
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; 09-05-2003 at 04:46 PM.
Blazer06 is offline   Reply With Quote
Old 08-30-2003, 10:02 PM   #2 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
qball is on a distinguished road
**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
qball is offline   Reply With Quote
Old 08-31-2003, 02:34 AM   #3 (permalink)
Registered User
 
Join Date: Aug 2003
Location: SoCal
Posts: 28
DRIVER J.R. is on a distinguished road
Send a message via AIM to DRIVER J.R.
qball you are so rude!
DRIVER J.R. is offline   Reply With Quote
Old 08-31-2003, 05:53 AM   #4 (permalink)
Registered User
 
Join Date: Jan 2003
Location: Orange, Mass.
Posts: 490
Blazer06 is on a distinguished road
Send a message via AIM to Blazer06
DBL Post


Blaze

Last edited by Blazer06; 08-31-2003 at 05:56 AM.
Blazer06 is offline   Reply With Quote
Old 08-31-2003, 05:55 AM   #5 (permalink)
Registered User
 
Join Date: Jan 2003
Location: Orange, Mass.
Posts: 490
Blazer06 is on a distinguished road
Send a message via AIM to Blazer06
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
Blazer06 is offline   Reply With Quote
Old 08-31-2003, 07:55 PM   #6 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
qball is on a distinguished road
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?
qball is offline   Reply With Quote
Old 09-01-2003, 05:07 AM   #7 (permalink)
Registered User
 
MrFreeze's Avatar
 
Join Date: Oct 2001
Location: Belgium
Posts: 112
MrFreeze is on a distinguished road
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...
MrFreeze is offline   Reply With Quote
Old 09-02-2003, 09:37 PM   #8 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
qball is on a distinguished road
MrFreeze,

just to be a wisearse, but, does that work with USB printers?
qball is offline   Reply With Quote
Old 09-02-2003, 10:21 PM   #9 (permalink)
Guest
Guest
 
Posts: n/a
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
  Reply With Quote
Old 09-03-2003, 12:42 AM   #10 (permalink)
Registered User
 
MrFreeze's Avatar
 
Join Date: Oct 2001
Location: Belgium
Posts: 112
MrFreeze is on a distinguished road
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
__________________
Life Suxss...
MrFreeze is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:59 AM.