Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Console bug
#4
Well, I can confirm it wasn't a bug.  What you're seeing is the intended behavior here for unimplemented command usage.  It was like I suspected -- I don't know squat about Linux/Mac and when I expanded the console commands a while back, I could only expand them for Windows users.   Here's the source from libqb.cpp:

Code: (Select All)
int32 func_pos(int32 ignore) {
#ifdef QB64_WINDOWS
    if (write_page->console) { // qb64 console CSRLIN
        CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo;
        SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
        HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, &SecAttribs, OPEN_EXISTING, 0, 0);
        GetConsoleScreenBufferInfo(cl_conout, &cl_bufinfo);
        return cl_bufinfo.dwCursorPosition.X + 1;
    }
#endif
    if (write_page->holding_cursor)
        return 1;
    return write_page->cursor_x;
}

If you're dealing with Windows and you're using POS and such with the console, it uses the windows funcrion GetConsoleScreenBufferInfo to return that information to you.

Otherwise it basically returns 1.   (Which is what you got as an answer.)

It's definitely nor a bug if it's doing exactly what it's told to do.  It's just an unimplemented command for Linux/Mac users with console.  Sorry there's no better news, but unless someone with more Linux/Mac experience than me wants to write a handler for the console to get that information back for us, it's just always going to return 1 for you.
Reply


Messages In This Thread
Console bug - by justsomeguy - 02-21-2026, 05:34 PM
RE: Console bug - by SMcNeill - 02-21-2026, 09:06 PM
RE: Console bug - by justsomeguy - 02-21-2026, 09:45 PM
RE: Console bug - by SMcNeill - 02-22-2026, 02:53 AM
RE: Console bug - by justsomeguy - 02-22-2026, 03:58 PM
RE: Console bug - by a740g - 02-23-2026, 06:59 AM
RE: Console bug - by grymmjack - 03-01-2026, 04:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Setting Focus between console and terminal cage 4 1,406 09-01-2024, 02:44 AM
Last Post: cage
  Possible Bug SpriggsySpriggs 1 732 04-06-2024, 12:33 AM
Last Post: a740g
Bug D notation bug bplus 13 2,817 08-26-2023, 05:12 PM
Last Post: Jack

Forum Jump:


Users browsing this thread: 1 Guest(s)