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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 578
» Latest member: zalexpittoz6631
» Forum threads: 3,071
» Forum posts: 28,000

Full Statistics

Latest Threads
More QB64PE at work
Forum: Programs
Last Post: bobalooie
Less than 1 minute ago
» Replies: 0
» Views: 1
Keymapper Utility
Forum: Utilities
Last Post: eoredson
29 minutes ago
» Replies: 0
» Views: 3
Be warned, I'm back!
Forum: General Discussion
Last Post: Sprezzo
6 hours ago
» Replies: 1
» Views: 26
Converting bytes into KB,...
Forum: Programs
Last Post: mdijkens
8 hours ago
» Replies: 6
» Views: 53
InForm-PE
Forum: a740g
Last Post: grymmjack
9 hours ago
» Replies: 96
» Views: 12,680
File List and Directory L...
Forum: SMcNeill
Last Post: dano
10 hours ago
» Replies: 3
» Views: 174
32 vs 64 bit math
Forum: Help Me!
Last Post: Jack
11 hours ago
» Replies: 8
» Views: 185
Use of Functions
Forum: Help Me!
Last Post: TempodiBasic
Yesterday, 01:49 PM
» Replies: 53
» Views: 1,612
Inputting output from oth...
Forum: Help Me!
Last Post: Helium5793
Yesterday, 12:30 PM
» Replies: 8
» Views: 222
Twizzle Logic Puzzle Game
Forum: Donald Foster
Last Post: bplus
Yesterday, 08:27 AM
» Replies: 13
» Views: 160

 
  More QB64PE at work
Posted by: bobalooie - Less than 1 minute ago - Forum: Programs - No Replies

Making electrical engineering less tedious, but now using InForm.

The electrical code requires that conductors be sized so that there is no more than 3% voltage drop from the nominal voltage at the farthest point of the circuit. As an experiment, I wrote a program using InForm to calculate voltage drops in circuits. It can analyze a single load at the end of a circuit or a series of loads along a circuit (think streetlights.) 

Doing the actual engineering is interactive, a combination of engineering science and economic considerations. If the voltage drop is too high, which parts of the circuit do you select to upsize the conductors, and by how much?

This is not finished, I have some thoughts for more features to add later. But the program works as it stands now.

Comments and suggestions are welcome.



[Image: Screenshot-2025-05-30-215017.png]



Attached Files
.zip   VDrops.zip (Size: 7.8 KB / Downloads: 0)
Print this item

  Keymapper Utility
Posted by: eoredson - 29 minutes ago - Forum: Utilities - No Replies

Hi,

Find attached the source to another keymapper utility.

Although it works in the QB64 IDE it is not a Windows utility -- use PowerToys instead.

This utility works for Ascii and Extended Ascii mapping with values of each being 1-255..

Also lists ascii chart and mapping charts. Some functions detect text keyboard keys.

Erik.



Attached Files
.zip   MAPPER.ZIP (Size: 4.12 KB / Downloads: 0)
Print this item

  Be warned, I'm back!
Posted by: Unseen Machine - 7 hours ago - Forum: General Discussion - Replies (1)

Hey folks,

So I have finally managed to get a modern laptop and can now run the latest version of QB64! 

I have resumed updating my libraries, demos and games and will of course need help/pointers and feedback...i'm sure you guys will be as congenial as ever though!

Thanks and happy coding!

Unseen

Print this item

  Converting bytes into KB,MB,GB,TB,PB
Posted by: euklides - 11 hours ago - Forum: Programs - Replies (6)

I needed a little function for convert bytes into KB,MB,GB,TB,PB.
Here she is..

Code: (Select All)
'Convert Bytes in KB,MB,GB,TB,TB
'put also spaces in long numbers

A$ = "123122555552344566": Print " "; CHIFFRESPACE$(A$)
A$ = "234855666": Print " "; CHIFFRESPACE$(A$)
A$ = "6000234855666": Print " "; CHIFFRESPACE$(A$)
A$ = "512445666": Print " "; CHIFFRESPACE$(A$)
A$ = "512": Print " "; CHIFFRESPACE$(A$)
A$ = "14265444444": Print " "; CHIFFRESPACE$(A$)
A$ = "1355": Print " "; CHIFFRESPACE$(A$)

Sleep
End




Function CHIFFRESPACE$ (D$)
    DD$ = D$: OCTEX$ = D$: DD1$ = "": sauto = 0
    For yu = Len(DD$) To 1 Step -1
        DD1$ = Mid$(DD$, yu, 1) + DD1$: sauto = sauto + 1: If sauto = 3 Then DD1$ = " " + DD1$: sauto = 0
    Next yu
    XCHIF$ = OCTEX$: YCHIF# = Val(XCHIF$)
    NBC = Int((Log(Val(XCHIF$)) / 2.303) + 1.01) 'number of digits... in OCTEX$
    If NBC < 4 Then FF$ = XCHIF$: UND$ = "bytes": GoTo aa
    If NBC < 7 Then ZCHIF# = Int(YCHIF# / 1024 * 10000) / 10000: FF$ = Str$(ZCHIF#): UND$ = "KB": GoTo aa
    If NBC < 10 Then ZCHIF# = Int(YCHIF# / 1024 / 1024 * 10000) / 10000: FF$ = Str$(ZCHIF#): UND$ = "MB": GoTo aa
    If NBC < 13 Then ZCHIF# = Int(YCHIF# / 1024 / 1024 / 1024 * 10000) / 10000: FF$ = Str$(ZCHIF#): UND$ = "GB": GoTo aa
    If NBC < 16 Then ZCHIF# = Int(YCHIF# / 1024 / 1024 / 1024 / 1024 * 10000) / 10000: FF$ = Str$(ZCHIF#): UND$ = "TB": GoTo aa
    ZCHIF# = Int(YCHIF# / 1024 / 1024 / 1024 / 1024 / 1024 * 10000) / 10000: FF$ = Str$(ZCHIF#): UND$ = "PB"
    aa: FF$ = _Trim$(FF$): If Left$(FF$, 1) = "." Then FF$ = "0" + FF$
    If InStr(FF$, ".") = 0 Then FF$ = FF$ + ".0000"
    JFF = InStr(FF$, "."): FF$ = Left$(FF$ + "0000000000000000", JFF + 4)
    JFF = InStr(FF$, "."): Mid$(FF$, JFF, 1) = ","
    Octey$ = "         (" + FF$ + " " + UND$ + ")"
    DD1$ = Left$(_Trim$(DD1$) + " bytes" + String$(60, 32), 55): W = Len(Octey$): Mid$(DD1$, Len(DD1$) - W, Len(Octey$)) = Octey$
    CHIFFRESPACE$ = DD1$

End Function

Print this item

  32 vs 64 bit math
Posted by: FCS_coder - 05-29-2025, 10:37 AM - Forum: Help Me! - Replies (8)

Hi all, new to the forum, new to QB64, but have done some coding in QB.

I have a general question on the math capabilities available.  I am tied down rright now to a 32-bit Win 11 machine.  I would like to do some math operations using 64-bit integers.  Will QB 64 be able to give me the full precision of the 64-bits?  I realize that I will lose speed on the thunking from 32 to 64 bits, but I can always recompile and run on a 64-bit machine when I get access to one.

I want to start coding again since I have some forced free time so expect some more general under-the-hood type questions.

Print this item

  Twizzle Logic Puzzle Game
Posted by: Donald Foster - 05-27-2025, 02:10 AM - Forum: Donald Foster - Replies (13)

Hello All,

This is my take on the single player logic puzzle Twizzle.

https://www.youtube.com/shorts/4Mo5ROmY3...ture=share


[Image: Twizzle-Screenshot.png]



.pdf   Twizzle-Description.pdf (Size: 8.41 KB / Downloads: 15)


.bas   Twizzle Logic Puzzle.bas (Size: 30.96 KB / Downloads: 11)

Print this item

  Inputting output from other languages
Posted by: Helium5793 - 05-26-2025, 05:17 PM - Forum: Help Me! - Replies (8)

Hi,
I have several programs that call python programs, the python program writes its results to disk and then the basic reads the results and uses them.  (some of the python libraries are very useful). In particular I am using pyephem, a library that calculates astronomical date on stars and planets.  
Is there a way to do this without the intermediate step of writing the information to disk?  Can the output of an external program be ported directly into a basic array or other structure?
John

Print this item

  Got an idea will it work ?
Posted by: doppler - 05-25-2025, 11:52 AM - Forum: General Discussion - Replies (7)

Before I go off and try this.  I will ask it here to see if "Yes you can and it would work".  Generally the best idea's stay private and nobody benefits.  I hate that approach.

What i do now: I use a program called Total Commander if you have used Norton commander in the past you know what I mean.  It's great for finding all the filenames in a directory (sub-directories) or drive.  From the total list show I can select via (numpad +) and subset based on a select pattern ie: *.jpg   I can clip and drop that list into another program for processing.  In short I have a list dropped into a program.

Is it possible: Using a console window in qb64pe to find all those JPG's list them with paths in the window, select them with ctrl-a and drop them into the program.  Using it this way, I save lot's of clicks and steps.

I have done some amazing things I never did with qb45 using qb64pe (and extensions).  If it's possible I have another sharp tool for the my toy box.  If I figured wrong.  Got an idea ?

Thanks

PS.
I never thought of this forum or users to be like Reddit.  Everyone here is both helpful and smart as fuck.

Print this item

  A New Game: The Sentinel, Attack of the Circles
Posted by: NakedApe - 05-24-2025, 01:09 AM - Forum: Works in Progress - Replies (2)

Deep in the African jungle, high in his tree-top lab, NakedApe has been hard at work on his next space game. This is my first attempt at 3D - well, 3D Lite for the mathematically challenged anyway. I tried to keep this fast-paced since attention spans are short. This has one-handed mode for easier play too. Thanks to bplus for help with circle aspects, SierraKen for the globe routine and Steve for bits of code off the forum.  This looked best at higher rez, so I made it 1920x1080.

It's a work in progress and I plan to take it a little further, so feel free to tell me what it's missing or not. Thanks for playing.
Ted



Attached Files
.zip   TheSentinel.zip (Size: 7.41 MB / Downloads: 26)
Print this item

  Pringle-like Shape Animation
Posted by: SierraKen - 05-24-2025, 12:38 AM - Forum: Programs - No Replies

I asked ChatGPT to make me a Pringle. So tinkering around with it I made this animation. 

Code: (Select All)

Screen _NewImage(600, 600, 32)
CENTERX = 300
CENTERY = 300
' Pringle parameters
SIZE = 300
STP = 1
Const ZSCALE = 30 ' Controls how much "curve" there is
num = 20
dir = 20
t = 4

Do
    If num > 3000 Then
        dir = -20
    End If
    If num < -3000 Then
        dir = 20
    End If
    num = num + dir * t
    For x! = -SIZE To SIZE Step STP
        For y! = -SIZE To SIZE Step STP
            ' Hyperbolic paraboloid formula: z = (x^2 - y^2) / scale
            z! = ((x! ^ 2) - (y! ^ 2)) / (SIZE * ZSCALE)

            ' Project to screen (top-down view with z as shading)
            screenX = CENTERX + x!
            screenY = CENTERY + y!

            ' Shade based on height (z)
            shade = 128 + z! * num
            If shade < 0 Then shade = 0
            If shade > 255 Then shade = 255

            PSet (screenX, screenY), _RGB(shade, shade, 255 - shade)
        Next
    Next
Loop Until InKey$ = Chr$(27)

Print this item