hii every body i'm working in updating project was developed in qbasic scince 1988 ,i face many problems understanding the code statments such as:
dh=cid-rod : dh2=cid*cid-rod*rod
y(1)=pvd:y(2)=od
IF ABS(y(1)-pvd)>10 GOTO 100
other mater is how to make the program prints the output to a usb printer attached in a network or directly to my computer ?
and how to make the output saved to excell sheet ,if possible?
thanks alot for your worthly help
new using qbasic
new using qbasic
hesham hafez
Re: new using qbasic
Just two assignment statements that could be in separate lines. In QB you can put several statements in the same line by separing them bycolons (:)moro145 wrote: dh=cid-rod : dh2=cid*cid-rod*rod
Two assignments to the co,ponents 1 and 2 of the array y. There must be a DIM y(size) as type at the start of the program to declara the arraymoro145 wrote: y(1)=pvd:y(2)=od
ABS is th absolute value of the expression if it's bigger than 10 the program jumps to a line labeled with a 100moro145 wrote:
IF ABS(y(1)-pvd)>10 GOTO 100
You must make the printer available to DOS in the Windows printer settings (It was possible in W98 and W2000, don't know in XP). You assign the printer to a false LPT1 port. Then you can use QBasic's LPRINT.moro145 wrote:
other mater is how to make the program prints the output to a usb printer attached in a network or directly to my computer ?
If this does not work you can print to a file then print with Notepad (It will garble the line drawing characters)
Code: Select all
shell "notepad /p yourprintfile
To export to Excel write to file using WRITE #. The resulting file is a csv file, easily imported in Excelmoro145 wrote:
and how to make the output saved to excell sheet ,if possible?
BTW: Moro145 sounds strange to spanish ears, as moro is here a derogative. But well, if you like it...
Re: new using qbasic
Just a note regarding line drawing characters.Antoni wrote:......
...... you can print to a file then print with Notepad (It will garble the line drawing characters)
In WORD 2003 of Windws XP, you can see line drawing characters by doing the following:
1) Print to a file with a different file extension, like .FIL
2) Get into WORD.
3) Word presents a small window called "File Conversion". In this window, select "OEM United States" from the menu.
4) Word will now show your text with the proper line drawing characters.
5) You can now print this Word file.
*****
Printing to Network Printer
See my response under "Newbie Question: Line Breaks"
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---
--- Time flies like an arrow, but fruit flies like a banana ---
Re: Printing to Network Printer
Sorry, but that response has nothing to do with this thread.zim wrote:See my response under "Newbie Question: Line Breaks"
*****Moneo*****
Duh...
Sorry, I meant under the topic "QB Coding and Printer questions".
(...fairly new member gets lost in the forum...)
(...fairly new member gets lost in the forum...)
--- Zim ---
--- Time flies like an arrow, but fruit flies like a banana ---
--- Time flies like an arrow, but fruit flies like a banana ---