QB64 Phoenix Edition v3.7.0 Released!
#51
I doubt it'll ever work in SCREEN 0, as screen 0 requires MONOSPACED fonts and as such should work fine with just the standard PRINT commands.  _UPrintString is more for use with Unicode, variable-width fonts, (and sometimes even variable-height fonts such as when a character might have elaborate flourishes in a script font,) which aren't ever going to work in a Screen 0 environment.

There's no _UPrint at the moment, (and they may never be,) as Print is perhaps the most complex piece of code every written on the face of the planet.  Take a moment and try and replicate its behavior in a routine of your own sometime.  Comma command, semicolon commands, printing letters and numbers, word wrap, screen scrolling, cursor positioning and.... on and on and on!

_UPrintString is a much simpler (and faster) piece of code -- take the given text, create it in the font desired, toss it onto the screen in a single line of output.  If wordwrap is needed, it's up to the user to implement that, rather than just trusting that the command itself will do so.  Same with screen scrolling and such, if you're ever going to be printing off the bottom of the screen -- that's something one would have to do manually as _UPrintString doesn't change cursor position and/or scroll the screen.

Different tools for different use cases.  Smile
Reply
#52
I don't think you have seen the source code of a C library. I was boggled what it took for Mix Software in Richardson, Texas to write what to do with printf() function. Yes I had to buy the source code for the C libraries used with Power C compiler way back in the early 1990's.

But PRINT in QuickBASIC was something M$ guessed correctly that it was going to help give them profits for a short time, and some fame for long afterward. Part of it was writing it for performance, rather than settling for MS-DOS Interrupt #9 (end with dollar sign) or whatever was done by GW-BASIC or by any 8-bit BASIC.
Reply
#53
The _WHEEL function still does not seem to work for relative mouse movements? I thought this was one of the things that was addressed in v3.7.0. The code below is example #2 from the _WHEEL wiki page ( https://qb64phoenix.com/qb64wiki/index.php/WHEEL )

Code: (Select All)
ignore% = _MOUSEMOVEMENTX 'dummy call to put mouse into relative movement mode

PRINT "Move your mouse and/or your mouse wheel (ESC to exit)"

d% = _DEVICES 'always read number of devices to enable device input
DO
    _LIMIT 30 'main loop
    DO WHILE _DEVICEINPUT(2) 'loop only runs during a device 2 mouse event
        PRINT _WHEEL(1), _WHEEL(2), _WHEEL(3)
    LOOP
LOOP UNTIL INKEY$ = CHR$(27)

END
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply
#54
Lightbulb 
Mageia v9 Beta 2 "Cauldron"

To install QB64PE successfully the following packages are required, install with "dnf" terminal packages handling program:

Code: (Select All)
make
gcc-c++.x86_64
lib64mesaglu1-devel.x86_64
lib64curl-devel.x86_64

The "mesaglu1" entry might be only for people that have Intel MESA, and otherwise I don't know about GPU's.
Reply
#55
Who the heck is running that OS
Schuwatch!
Yes, it's me. Now shut up.
Reply
#56
(05-25-2023, 01:20 PM)Ultraman Wrote: Who the heck is running that OS

You're right. I wiped it off because I had a problem. But I like checking out Linux distros and installing QB64PE on them.
Reply
#57
I am using Indic Script. I ran the example in (Russian) _UPrintstring . That printed correctly. I substituted DATA with characters from Telugu. and changed the font . The print was grossly wrong. Libre Office seems to have the right software for handling Indic   I shall be extremely grateful if QB64pe can be made to do similarly
Reply
#58
(05-30-2023, 12:12 PM)sivacc Wrote: I am using Indic Script. I ran the example in (Russian) _UPrintstring . That printed correctly. I substituted DATA with characters from Telugu. and changed the font . The print was grossly wrong. Libre Office seems to have the right software for handling Indic   I shall be extremely grateful if QB64pe can be made to do similarly

My understanding is that we'll need to use something like Pango or HarfBuzz to achieve something like that. Although this is not on our roadmap yet, you can put this in our issue tracker so that we do not forget about it. Thanks a lot for the suggestion!

Issues · QB64-Phoenix-Edition/QB64pe (github.com)
Reply
#59
(05-30-2023, 12:12 PM)sivacc Wrote: I am using Indic Script. I ran the example in (Russian) _UPrintstring . That printed correctly. I substituted DATA with characters from Telugu. and changed the font . The print was grossly wrong. Libre Office seems to have the right software for handling Indic   I shall be extremely grateful if QB64pe can be made to do similarly

Welcome to the forums!
Reply
#60
Bug 
Was the old bug ever fixed with PRINT # and newlines always assuming Windows?

Because today on Manjaro Linux KDE I wrote a QB64 program that created a "bash" script, which included CHR$(13) into the end of a filename. It took over half-hour to debug a program I had which couldn't find a filename that "looked the same" to me in the file manager but it wasn't until I attempted to load one of the target files into GIMP. The open file requester of GIMP showed "%0D" at the very end of each suspect filename.

The solution is either to wrap the desired filenames in single- or double-quotation marks on both sides of "cp" or "mv" statement to write into a script, or to put CHR$(10) with semicolon at the end of each PRINT # entry and never allow it to create a new line. Otherwise, the text file that is created would have to be loaded into Kate or other text editor that could re-save with Unix line endings instead of the CRLF combination for Windows.
Reply




Users browsing this thread: 10 Guest(s)