Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
accessing the CLI in a prog
#14
(02-01-2024, 01:24 AM)GareBear Wrote: SMcNeill,

Here's what I run QB64PE 3.11.0 IDE with:

KernelĀ  - Linux/x86_64 6.6.10-76060610-generic Kernel
OS Name - Pop!_OS 22.04 LTS
OS Type - 64-bit
Windowing System - X11
Desktop Environment - GNOME 42.5
Terminal - gnome-terminal
Shell - bash 5.1.16

This OS is light enough to run on a Windows 7 machine along with a 1TB hard drive. The IDE does not lock up my system with this combination of OS and hard drive. I tried to include everything you might need to know.

When I ran it with the '$Console:Only'. It just compiled and no display with a OK to show it was finished. When I ran it with '$Console' it displayed the directory contents along with 'text.txt' in the listing and the usual 'Press any key to continue' when finished.

I think this is what you wanted to know what I have. If you need to know more let me know. - GareBear
The issue is that the IDE doesn't spawn a new terminal to run your program in, so the output of the program will just appear in the terminal you started the IDE from (if you didn't start the IDE from a terminal, then the output may not be visible anywhere).

I believe we have a bug report on this, the IDE should really find and start a terminal for you (and warn you if it doesn't find one). That said if you open a terminal and run the compiled program that way then you will see the output you're expecting.

Also note that `$Console` and `$Console:Only` are very different, practically different commands. In your code `$Console` does nothing - it enables read/write from the console but there is still a graphical window. Additionally the graphical window is still the default destination for `PRINT` and friends so your program never uses console input/output and what you're seeing is just output on the graphical window, the same as all non-`$Console`.

When you use `$Console:Only`, the graphical window is disabled completely and your program reads/writes from/to the console by default. The lack of a graphical window is why you don't see anything.
Reply


Messages In This Thread
accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 01:31 AM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 01:45 AM
RE: accessing the CLI in a prog - by bplus - 01-31-2024, 01:48 AM
RE: accessing the CLI in a prog - by TerryRitchie - 01-31-2024, 02:02 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 10:50 AM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 11:48 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 01-31-2024, 11:08 PM
RE: accessing the CLI in a prog - by GareBear - 01-31-2024, 04:08 PM
RE: accessing the CLI in a prog - by bplus - 01-31-2024, 06:05 PM
RE: accessing the CLI in a prog - by GareBear - 01-31-2024, 07:28 PM
RE: accessing the CLI in a prog - by SMcNeill - 01-31-2024, 09:57 PM
RE: accessing the CLI in a prog - by GareBear - 02-01-2024, 01:24 AM
RE: accessing the CLI in a prog - by SMcNeill - 02-01-2024, 01:31 AM
RE: accessing the CLI in a prog - by DSMan195276 - 02-01-2024, 01:59 AM
RE: accessing the CLI in a prog - by GareBear - 02-01-2024, 03:32 AM
RE: accessing the CLI in a prog - by PhilOfPerth - 02-01-2024, 06:17 AM
RE: accessing the CLI in a prog - by Steffan-68 - 02-01-2024, 04:28 PM
RE: accessing the CLI in a prog - by PhilOfPerth - 02-01-2024, 11:19 PM



Users browsing this thread: 6 Guest(s)