Recent posts

#11
Code to share / Re: Example functions
Last post by Frank Brübach - April 24, 2024, 10:05:46 PM
Function examples Here factorial and quattro

'
' two function examples, factorial, quattro

' -- example 1
Function factorial(x As Integer) As Integer
    ' This is a recursive function
    ' to find the factorial of an integer

    If x = 1 Then
        return 1
    Else
        return x * factorial(x-1)   
    End If
End Function

printy factorial(4) ' 24

pim num As Integer
    num = 3
Printy "The factorial of " + num  + " is "  + str(factorial(num) )


' -- example 2
function quattro(i as pro) as pro
  return i*4
end function

printy quattro(4) ' 16
#12
Code to share / Re: Examples for next and do...
Last post by Frank Brübach - April 24, 2024, 10:03:27 PM
Next example for... Next and do... Loop

' -- expl 1
' -- for...next
'
dim i as integer, height as integer
height = 5
FOR i = 1 to height
  printy string(i, "*")
next
printy "after loop the value i has value " + i

'
'-- expl 2 do...loop
'
dim n as integer, even as integer
Do
  n += 1
  If n > 7 Then Exit Do
  If n Mod 2 Then Continue Do
  even += 1
Loop
Printy "even number: " + even
#13
Code to share / Example Intro and HalPromIde2...
Last post by Frank Brübach - April 24, 2024, 09:33:10 PM
Hello all..

Some code example you can find Here and try to use... All example I added in ZIP and rar folder... If you have questions please ASK...

For Testing an example you can Push the "Quick Run" Button .. the Files you can save and load have *.habas endings.

Many thanks Theo for installing this new SUB Board and Charles for His great oxygen Basic language I could study the Last month and years during Corona time and Last year

Dont forget I am Hobby programmer Not  a Professional one.. the IDE iS 80 percent ready
I will improve IT step by step.. at the Moment its all in Interpreter modus

Creation building exe File will come too  IT Works already but I must Test all again

If you are starting the HalPromide24 Type in First some Text in console window to start the the HalPromide  IDE for Further working

I have added minimal Version of HalProment Basic 32 Bit , more will come later

First of all a Pic of the HalPromIde24  and an example with simple calculation

' simple calculation 2
' legend :
' dim = pim, dword = pro
' printy = print
' pstring = string
'
pim a,b,c,d as pro
a= 10 : b=20 : c=40 : d=a*b
printy a
printy d
pstring s = "Hello Batman " + a ' 10
printy s
pstring st = "Hello Spiderman " + d ' 200
printy st

pim k as float
k=2345.67 '2345.6699
printy k
#14
Meta Forum / We got a new Forum for our Mem...
Last post by Theo Gottwald - April 24, 2024, 08:19:29 PM
🌟 Exciting news! We've launched a new Board for our member Frank Brübach! 🎉
He asked for it, and we made it happen! 🛠�
If you have a project and want your own sub-forum, just let us know! 📢
But here's the catch: 🚨
If the forum stays inactive for a long period and no one writes in it, it might be discontinued. ⏳
Share your thoughts and stay active! 💬
#NewForum #FrankBrübach #Projects #MemberEngagement #StayActive 🌍🚀👥💡✨




Wir haben ein neues Forum für unser Mitglied Frank Brübach eingerichtet! 🎉
Er hat danach gefragt und wir haben es möglich gemacht. 🙌

Wenn du ein Projekt hast und ein eigenes Unterforum möchtest, kannst du einfach nachfragen. 📬
Aber hier ist die Bedingung: 🚨
Wenn das Forum längere Zeit inaktiv bleibt und niemand darin schreibt, könnte es aufgegeben werden. ⏳

Teilt eure Gedanken und bleibt aktiv! 💬

#NeuesForum #FrankBrübach #Projekte #MitgliederEngagement #AktivBleiben 🌟👥📊
#15
Meta Forum / Re: Guess who just applied for...
Last post by Theo Gottwald - April 24, 2024, 07:30:23 PM
You are not alone, another Forum Member wrote:
"Yes John spikovsky is a lunatic and bad tempered guy he was kicked out of freebasic powerbasic and here ;) I would avoid stress he offended a lot of people back then"
As this is the situation i will not accept his application.
#16
OxygenBasic Examples / Re: Moveable objects qt
Last post by Frank Brübach - April 24, 2024, 02:40:28 PM
Hi Charles

It's Just an Idea how to improve or simplifier a collision for objects Made this fictive Code for consoleG  (Same example Like above)


' fictive code example only an idea for boundingbox for a cube m500 and m400
'
' This example serves for a moving the cube in discrete steps (e.g., one unit at a time)

' Movement logic for cube 500
if key_up_pressed then
    moveCube500(0, 1) ' Move up one unit at a time
elseif key_down_pressed then
    moveCube500(0, -1) ' Move down
elseif key_left_pressed then
    moveCube500(-1, 0) ' Move left
elseif key_right_pressed then
    moveCube500(1, 0) ' Move right
end if

int new_x, newy

' Function to move cube 500 and handle collision
sub moveCube500(int dx, int dy)
    ' Calculate new position
    new_x = cube500_x + dx
    new_y = cube500_y + dy
   
    ' Check for collision with cube 400
    collision = BoundingBoxIntersect(new_x, new_y, cube_width, cube_height, cube400_x, cube400_y, cube_width, cube_height)
   
    ' If no collision, update position
    if not collision then
        cube500_x = new_x
        cube500_y = new_y
    end if
end sub
#17
Meta Forum / Re: Guess who just applied for...
Last post by Charles Pegge - April 24, 2024, 02:29:10 PM
I regret to say, in the interests of all our members here, it would not be a good idea.
#18
Advanced Datatypes / Macros for using the Powerbasi...
Last post by Theo Gottwald - April 24, 2024, 10:08:33 AM
🚀 These powerful basic data objects are designed to be very versatile, which is why they use the slower variant data type.

This means they can be used for numbers as well as strings, but the downside is that they are relatively slow.

The object declaration also requires a lot of typing, but at least you can save some time with the macro below. Overall, I think this type of object data type is too slow for many things and therefore not universally applicable.
It also goes against the Power Basic principle of "smaller faster". 💡
#PowerBasic #DataTypes #Versatility #Efficiency


MACRO Make_Stack(P1) = LOCAL P1 AS ISTACKCOLLECTION:P1 = CLASS "StackCollection"  

' Usage:

LOCAL V01 AS VARIANT
LOCAL T01 AS LONG         

Make_Stack(stack)
stack.Push V01 
T01=stack.COUNT
V01=stack.Pop  


MACRO Make_Que(P1) = LOCAL P1 AS IQUEUECOLLECTION:P1 = CLASS "QueueCollection"  

' Usage:
LOCAL V01 AS VARIANT  
LOCAL T01 AS LONG         

Make_Que(queue)
queue.ENQUEUE V01
T01=queue.COUNT
V01=queue.DEQUEUE



#19
Meta Forum / Re: Guess who just applied for...
Last post by Theo Gottwald - April 24, 2024, 09:54:13 AM
Lets see if Charles agrees to give that person a chance to show up.
And show better culture then last time.
I remember that Jose blocked the person for some reasons.
However I can accept someone who may have changed over time.
I will never accept people with bad behavior or insults in this forum.
#20
Meta Forum / Re: Guess who just applied for...
Last post by Johan Klassen - April 24, 2024, 08:19:29 AM
if we are talking about the person that I think that we are, he is acquainted with Oxygen Basic and Charles gets along with him.