Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 322
» Latest member: vicoriaswift7062
» Forum threads: 1,745
» Forum posts: 17,906

Full Statistics

Latest Threads
astuce pour survivre fina...
Forum: Utilities
Last Post: coletteleger
05-14-2025, 04:47 AM
» Replies: 0
» Views: 47
trouver permis de conduir...
Forum: Utilities
Last Post: nicolasrene
05-05-2025, 05:24 AM
» Replies: 0
» Views: 56
LIGHTBAR Menu
Forum: Programs
Last Post: nicolasrene
05-05-2025, 05:08 AM
» Replies: 15
» Views: 1,067
Learning Pallet Rack Safe...
Forum: Utilities
Last Post: Sandrapew
04-03-2025, 09:36 AM
» Replies: 0
» Views: 62
Choosing New Versus or Pr...
Forum: Utilities
Last Post: Sandrapew
03-18-2025, 01:11 AM
» Replies: 0
» Views: 61
The QB64 IDE shell
Forum: Utilities
Last Post: JasonPag
09-16-2024, 05:37 PM
» Replies: 9
» Views: 1,142
Importance regarding Ches...
Forum: Utilities
Last Post: JasonPag
09-01-2024, 06:34 PM
» Replies: 0
» Views: 90
Chess and Analysis and En...
Forum: Utilities
Last Post: JasonPag
08-28-2024, 02:37 PM
» Replies: 0
» Views: 92
DAY 009:_PutImage
Forum: Keyword of the Day!
Last Post: grymmjack
09-02-2023, 02:57 PM
» Replies: 54
» Views: 3,784
Fall Banner Contest?
Forum: Site Suggestions
Last Post: grymmjack
08-31-2023, 11:50 PM
» Replies: 36
» Views: 2,406

 
  Grade Keeper V4
Posted by: NasaCow - 05-23-2023, 04:35 AM - Forum: Works in Progress - Replies (2)

After reading through the board and seeing other examples, I thought it be best I will keep the most recent verison on the first post (this post.) Starting a new thread to keep it clean and keeping the old for historical thoughts.

So here is the next update!

.zip   05-23-23.zip (Size: 537.68 KB / Downloads: 35)

Code: (Select All)
'====================================================================================
'|                                                                                  |
'| Grade Keeper Build 4.1.2 - Resolving issues & adding more user-friendly features!|
'|                                                                                  |
'| Release #6 May 23rd, 2023                                                        |
'|                                                                                  |
'| Additions: #1 - Gradebook Fuctionality! - Clear grades and deletion commands     |
'|                 now fuctional (though I don't like the flow for deletion...)     |
'|                                                                                  |
'| Modifications: #1 - All fonts built at start, faster report production!          |
'|                #2 - Duplication of code moved to a sub MENUFRAME (Title)         |
'|                #3 - Arial replaced with Arial Narrow due to rendering issue.     |
'|                #4 - New add student screen. Resolves issues and makes input less |
'|                     tedious (quicker to do and correct mistakes)                 |
'|                                                                                  |
'| Current Limitations: #1 - Printed reports limited to windows                     |
'|                      #2 = Printed reports limited to 1 page                      |
'|                      #3 - Gradebook commands: Add, clear grades, remove          |
'|                           assignment and save and exit (F2, F6, F8, F12)         |
'|                           are fuctional                                          |
'|                      #4 - Gradebook limited to 20 students and about 20          |
'|                           assignments (name length dependent)                    |
'|                                                                                  |
'| Konwn Bugs & Issues: #X - Cancel changing class set will... (Resolved)           |
'|                      #X - Adding an assignment will delay input and cause first  |
'|                           keypress to be loss with GLI (Much less frequent)      |
'|                      #X - Email and address field of add student can overlap     |
'|                           (Resolved with new add student. Old modify student     |
'|                           present until feedback and further testing before      |
'|                           modifying that routinue.                               |
'|                      #1 - GLI word wrap issues here and there, will fix later.   |
'====================================================================================

The more I use Terry's GLI library, the more powerful and useful I am finding it and how great it works. Do check out the new add student screen (now with mouse support!) to see it in action. Word wrapping is still an issue but it is lower on my list of things to get done. I left the old modify student routinue in place for now, pending on feedback. Then I will also adjust that to be more user-friendly as well!

[Image: image.png]

I believe I got all (or at least most) of the mis-aligned text due to the font change. If you see something funny, please let me know so I can correct it.

Also, though all the files used are in the data.bas file as DATA lines, I also include the raw files in a Dev folder for ease of others to tweak changes.

Finally, I feel like I had to hack the delete assignment command to make it work right. For the life of me, I cannot figure out why the grades were not realigning with the cells after being updated. So after seeing the sub placing them correctly on relaunch, that is exactly what I see a loop up for. To relaunch the gradebook to show the grades right. Don't like such a hack but it works and therefore is staying for now until I have the time to figure out what happened...

Finally, Finally, on a personal note. I am now working (well suppose to starting yesterday) on my master thesis for my master in education. I wanted to get this update out before I unplug for a little bit. I may be a bit slower for a few months but I hope to keep working and improving this program (I do find it relaxing to program Angel ). I feel like I am getting close to calling it a full-on beta here soon!

Current verison:

.zip   05-23-23.zip (Size: 537.68 KB / Downloads: 35)

Print this item

  BAM How To: Create, Run, Save, and Share your BASIC programs
Posted by: CharlieJV - 05-23-2023, 02:26 AM - Forum: QBJS, BAM, and Other BASICs - Replies (2)

Print this item

  BAM: download it, run it locally, store it anywhere
Posted by: CharlieJV - 05-22-2023, 12:33 PM - Forum: QBJS, BAM, and Other BASICs - Replies (10)

Project Website

Print this item

Smile Portable QBJS
Posted by: mnrvovrfc - 05-22-2023, 08:00 AM - Forum: QBJS, BAM, and Other BASICs - Replies (2)

QBJS is a good idea in this burgeoning world.

Soon I'm not going to be able to have my own online connection. Pretty much for the rest of this year but really uncertain the next.

Therefore, my question is this: could QBJS be used totally offline? If so, how?

I support this because I prefer something as compatible with QB64 as possible, if I have to use it only inside a web browser.

Print this item

Bug SCREEN() function doesn't make nice with _FONT in graphic modes
Posted by: mnrvovrfc - 05-21-2023, 09:23 AM - Forum: General Discussion - Replies (5)

It looks like SCREEN() function was broken in one of the updates, either that or it's not designed anymore to work in graphic modes. Particularly in 32-bit color.

Run this example:

Code: (Select All)
screen _newimage(800, 600, 32)
print "Hello"
print screen(1, 1)
print chr$(screen(1, 1))
end

Below the message it returns 219 and the solid block.

The thing is that I want to read characters from "PRINT USING" output without setting up another hidden screen for it and without creating a temporary file which causes wear and tear on the system due to the thousand calls that my program could potentially generate from it.

After being run my program kept returning an illegal function call because QB64PE doesn't seem to like neither the text coordinates given to it for SCREEN() function. It looks like one cannot set a _FONT and then call SCREEN().

Run this example:

Code: (Select All)
screen _newimage(800, 600, 32)

dim i as integer, amf as long
amf = _loadfont("/usr/share/fonts/liberation/LiberationSans-Regular.ttf", 12)
_font amf

for i = 1 to 120
    locate 4, i
    print chr$(i + 32);
    locate 5, 1
    print i; screen(4, i);
next
end

Tested on Linux; replace the _LOADFONT() line with the appropriate for MacOS or Windows. I have tried this with a monospace font, and with optional "MONOSPACE" parameter to _LOADFONT(). This doesn't even go beyond the first position.

So I guess I will have to do without "PRINT USING" formatting toward using _PRINTSTRING or _UPRINTSTRING.

Print this item

  b+ Beginners Corner
Posted by: bplus - 05-20-2023, 06:34 PM - Forum: bplus - Replies (54)

I hope to post fun little bits of code and then try to comment them as fully as I can in attempts to get people new to QB64 up and running faster. Feel free to ask questions to get clarification, I may have screwed up.

This is something I posted at Friends after messing around with a dice roll thing at Aurels place:
BTW that's here: https://friends-of-basic.freeforums.net
and here: http://basic4us.epizy.com/forum/index.php

Here is original post:

Code: (Select All)
_Title "Playing for Charity: 100 dice" ' b+ 2023-05-20
' A game that no one loses!
Randomize Timer
Dim As Long roll, Charity, me, r
For roll = 1 To 100
    r = Int(Rnd * 6) + 1
    Print "  Roll number:"; roll; "is"; r
    If r < 5 Then Charity = Charity + r Else me = me + r
    Print: Print "         I get 5's and 6's:"; me
    Print " Charity gets 1, 2, 3, 4's:"; Charity
    Print: Print "     zzz... press any to continue"
    Print
    Sleep
Next
Print: Print " Treat ";
If me > Charity Then Print "yourself"; Else Print "Others";
Print " specially well today."

Then I decided if I really wanted to do something Friendly I should comment more fully for Beginners.
So here is same resulting output with lots of comments:
Code: (Select All)
' The following not in original code but a very good habit to get into, it will save you
' from your typos. 3P = Proper Programming Practice :)
Option _Explicit ' This forces you to Dim (or ReDim) your variables before you use them.
' !!! EXCEPTION !!! should you do something like DEFINT A-Z or DEFLNG A-Z then everything
' is automatically. :O

' If the following is in the first lines of your program and you go to save it, QB64 IDE
' will suggest your _Title string for your .bas file name when starting from File > New.
_Title "Playing for Charity: 100 dice" ' b+ 2023-05-20   < 3P author and date with _Title.
' A game that no one loses! < 3P a quick summary or comments. I usually list versions here.

Randomize Timer ' this is here so I don't play the same game over on each run.

' Dim As Long roll, Charity, me, r  < 3P originally I had this, but really strong 3P is
' declaring all your variables first 2nd part of Option _Explicit team.
Dim As Long roll '            this tracks the For loop index eg roll number
Dim As Long r '               this is for random to be used to store the dice roll value.
Dim As Long Charity '         variable to store running total points for Charity
Dim As Long me '              variable to store running total points for me.
' I am using Long because I want Integers and Long is easier to type and doesn't take more
' time than Integer Type. So I get a range of over 32,000 with 0 cost.

For roll = 1 To 100 '         the main loop does 100 rolls

    r = Int(Rnd * 6) + 1 '    Rnd = 0 to .9999 Multiply by 6 and have 0 to 5.9999
    '                         Take Int(0 to 5.99999) get 0,1,2,3,4,5
    '                         Add 1 for 1 to 6
    '
    ' Print something; < with semi colon ending keeps the print head right where it stops.
    ' Print something, < with comma tabs the print head right to set column widths
    ' Print something  < nothing after literals or variables moves print head to next line.
    ' Print will automatically start on next line if can't finish print job on current one.
    ' Print:           < finishes last print line or starts new one by inserting blank line.
    Print "  Roll number:"; roll; "is"; r ' this first line reporting roll number and roll.

    If r < 5 Then Charity = Charity + r Else me = me + r ' this decides if me or Charity
    ' gets the rolled points

    ' This reports the running scores and tells Sleep is activated so we have to press a key
    ' to continue game.
    Print: Print "         I get 5's and 6's:"; me
    Print " Charity gets 1, 2, 3, 4's:"; Charity
    Print: Print "     zzz... press any to continue"
    Print
    Sleep
Next ' end of 100 rolls loop onto summary result.

Print: Print " Treat ";
If me > Charity Then Print "yourself"; Else Print "Others";
Print " specially well today."
' the End  < 3P if you had GoSubs after this End put an End statement here.

I decided to post the 2nd one here first because A) this is my favorite forum and B) it is likely to be seen more here.
C) I thought it an excellent first post for this thread.

Print this item

  module/library version string?
Posted by: thesolarcode - 05-17-2023, 08:11 PM - Forum: Help Me! - Replies (3)

Trying to implement version string per library.
I don't want to have for each library a separate CONST or SUB/FUNCTION with different name just to get it's version string. 
I also don't want to hardcode the library names and versions in a single place.
DATA / READ / RESTORE doesn't work, because RESTORE doesn't accept a variable.
Any ideas how I could implement this?

Print this item

  Font display on 3.7.0
Posted by: NasaCow - 05-17-2023, 12:51 AM - Forum: Help Me! - Replies (6)

I have been playing around with various ideas but it seems the fonts are loaded differently or displayed differently from 3.6.0 and 3.7.0. Not sure if I have to adjust what I am doing to make it look good again but, personally, I can't accept how they look. Here is a comparision side by side of the two different versions.

[Image: image.png]

You can see the new hotness on the left and the old and busted on the right. Look at the '2's and 'o's. They are cut-off. The problem seems to show itself on lower font sizes where letters are being cut off. (the 3rd line is using a large font and being scaled down as a temp work around but still doesn't look as good as it should if you ask me...)

Here is a quick program ran in 3.7.0

[Image: image.png]

Same code on 3.6.0


[Image: image.png]

You can see in 3.7.0 that 'J' and '2' is being cut (oddly the 'o' isn't) and gets worse the smaller the font size loaded.

Here is the code:

Code: (Select All)
DIM AS LONG Screen1, Font24, Font12

$NOPREFIX

Screen1 = NEWIMAGE(1280, 720, 32)
Font24 = NEWIMAGE(600, 300, 32)
Font12 = NEWIMAGE(210, 100, 32)

SCREEN Screen1

FONT LOADFONT("arial.ttf", 60)
PRINT "1234567890-=`~!@#$%^&*()_+?:<>"
PRINT "abcdefghijklmonpqrstuvwxyz"
PRINT UCASE$("abcdefghijklmonpqrstuvwxyz")
PRINT

FONT LOADFONT("arial.ttf", 48)
LOCATE 5
PRINT "1234567890-=`~!@#$%^&*()_+?:<>"
PRINT "abcdefghijklmonpqrstuvwxyz"
PRINT UCASE$("abcdefghijklmonpqrstuvwxyz")
PRINT

DEST Font24
FONT LOADFONT("arial.ttf", 24)
PRINT "1234567890-=`~!@#$%^&*()_+?:<>"
PRINT "abcdefghijklmonpqrstuvwxyz"
PRINT UCASE$("abcdefghijklmonpqrstuvwxyz")
PRINT

DEST Font12
FONT LOADFONT("arial.ttf", 12)
PRINT "1234567890-=`~!@#$%^&*()_+?:<>"
PRINT "abcdefghijklmonpqrstuvwxyz"
PRINT UCASE$("abcdefghijklmonpqrstuvwxyz")
'LINE (0, 0)-(209, 39), , B
PRINT

DEST Screen1

'No scaling
PUTIMAGE (0, 350), Font24
PUTIMAGE (0, 450), Font12

'Scaling to see better
PUTIMAGE (300, 450)-(1140, 850), Font12

FONT 16
SLEEP

A copy of the font file I used is attached, it is the same as the system installed Arial


Any work arounds or new ways of doing things, please let me know! Thanks



Attached Files
.zip   Arial.zip (Size: 527.45 KB / Downloads: 22)
Print this item

  Path doesn't exist for $COLOR constants
Posted by: mnrvovrfc - 05-15-2023, 10:00 PM - Forum: Wiki Discussion - Replies (1)

This page:
https://qb64phoenix.com/qb64wiki/index.php/$COLOR

has information that no longer applies, checking this out in QB64PE v3.4, as well as v3.7 just now.

This is what it currently has to say about where the $COLOR declarations are located:

Quote:$COLOR:0 adds constants for colors 0-15. The actual constant names can be found in the file source/utilities/color0.bi.
$COLOR:32 adds constants for 32-bit colors, similar to HTML color names. The actual constant names can be found in the file source/utilities/color32.bi.

At this moment:

Code: (Select All)
(qb64pepath)/source

only has BAS files and a couple of folders. There is no "utilities" folder.

The correct path is:
Code: (Select All)
(qb64pepath)/internal/support/color

where "qb64pepath" is the directory were QB64PE was installed.

This is in case somebody is interested in knowing what the color constants are.

Print this item

  MyBB Memory Leak?
Posted by: TerryRitchie - 05-15-2023, 06:06 PM - Forum: General Discussion - Replies (16)

Has anyone else noticed this using FireFox or even another browser:

Often times I'll leave Firefox run for weeks at a time. Every now and then I'll get up in the morning to notice Task Manager showing FireFox using over 4GB of RAM and climbing.

I've narrowed this down to this site. To verify this I let FireFox run with this site as its only tab (I used another browser to do other things, yuck). For the past few months I have been tracking the issue using this method. With only this site loaded I'll get a run away memory issue in FireFox within a few days. I can let FireFox run for weeks with many tabs open and no memory issue. As soon as I open this site I'm guaranteed to have a run away memory issue within a day or two.

Is anyone else noticing this?

Print this item