Author Topic: How do you print a program listing from the QB64 shell No PRINT on FILE menu.  (Read 3516 times)

0 Members and 1 Guest are viewing this topic.

Offline bjg201

  • Newbie
  • Posts: 1
    • View Profile
I just downloaded QB64 on Win 10, 64 bit.  How do I print a program listing as there is no PRINT command on the FILE menu.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Could copy/paste it into your favorite word processor and print from there.

Otherwise you have to code something.

Welcome to the forum.
« Last Edit: December 31, 2020, 07:40:57 pm by bplus »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
I almost didn't post this as the IDE is so old now...but you can print source code from my QB64 IDE.  Please note, I haven't tested it in Windows 10.  Also, my IDE doesn't recognize many new commands found in the current version of QB64, but that shouldn't affect printing.
http://www.qbasicnews.com/dav/projects.php#DAVSIDE

- Dav

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Let's say you have a program called: myprogram.bas

Open the QB64 IDE and paste in this code...

SHELL _DONTWAIT(START Notepad /min /p myprogram.bas"

Run the program. It's okay that the program is "Untitled." It will still run, without being saved.

So what this does is tell Notepad to open minimized, open your program called myprogram.bas in this example case, and then the /p switch prints it. Note the START command allows the /min switch to be used. It isn't necessary to run Notepad minimized, but it's nice to have it out of the way.

Welcome to the forum, and this is funny, because I was just thinking the other day it would be nice if a PRINT option was added, at some point, to the project. I'm just not sure with all the cross-platform printing issues if that is too complicated an undertaking, and the use, frankly, would be minimal, which would not make this a priority for the dev team.

Hey Dav, you posted while I was writing this.Nice to see your IDE prints, but is it cross-platform compatible?

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Hey Pete. No, it's just for Windows Im afraid.

Happy new year to you...

- Dav

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Thanks for the reply. I was expecting Dav's not here, man! Oh wait, that's my bit.

Happy New Year back at you!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/