Recent posts

#71
Code to share / C++ example simple
Last post by Frank Brübach - May 13, 2024, 06:13:33 PM
Here is a simple c++ example I tried to Convert and my Idea was to translate much more for next Updates


int main {

int x = 5;
int y = 6;
int sum = x + y; '
'int mult = x * y;
'cout << sum;
cout sum;
'cout mult; ' 30 ok

return 0;
}
' result 11 ok
#72
Code to share / Class example 2
Last post by Frank Brübach - May 13, 2024, 06:10:16 PM
Class example 2

' class test addition, division
'
class statis

method plus() as double
method average() as double
dax(100) as double
dnx as long
end class

'----------------
methods of statis
'================

method plus() as double
dim i as integer
for i = 1 to this.dnx
method += this.dax(i)
next
end method

method average() as double
  method = this.plus / this.dnx 'division
  'method = this.plus + this.dnx 'addition
end method

end methods

'test
dim stx as statis

stx.dax => 2,4,6,8,10,12,14,16,18,20
stx.dnx = 8
print `plus: ` str(stx.plus) ` Average: ` str stx.average ' 72, 9 '' 72,80
#73
Code to share / Calculation example 4
Last post by Frank Brübach - May 13, 2024, 06:05:41 PM
[Code[
' francolinox/halProment-Basic
'-- new features: pys, p?, msgbox
'-- calc example 4
'
pim a,b,c,d,e as pro
pim z as pys
z=3
a=20
b=30
c=40
d=a*b
e=d*b
string s,st
pstring strx
strx = "powerbasic is a good basic program"
p? strx
s="Hello Batman " + str(d)
st="Hello Superman " + str(e)
print s
printy st
p? z
msgbox "hello"
#74
Code to share / Calculations and function
Last post by Frank Brübach - May 13, 2024, 06:01:33 PM
Next calculation example, printy and p?, pstring,

' simple calc with printy and p?
' and two different functions with a friendly pbmain()
'

pim a,b,c,d,e as pro
pim s,st as pstring

a=30
b=40
c=50
d=a*b
e=d*c
s= "Hello Superman "+str(d)
st= "Hello Ironman "+str(e)
printy s
p? st

function pbmain() as long
pro a=2345
pstring s="I am thor "+a
'print s
return a
end function

print pbmain() '2345

function pbmain() as long
pro a=2345
pstring s="I am thor "+a
print s
'return a
end function

pbmain() ' I am Thor 2345
#75
Code to share / Re: Example Intro and HalProm...
Last post by Frank Brübach - May 13, 2024, 05:51:20 PM
Hello all :) 👋

Made Last days for me an important Update of HalPromentBasic ...
I have changed some functions and Keywords.. its running all on a 64-bit machine now too

Halpromide Editor Shows at the start a Photo of the Stanley Kubrick film 2001 space odyssee because the hal Name belongs to this movie :)

The new Update 2 you can find in First Post at this Board

Next Update will expand and enhance Power with include Files and exe File producing

Thx, Frank




#76
General Discussion / Brain Really Uses Quantum Effe...
Last post by Charles Pegge - May 13, 2024, 04:07:39 PM
New research supporting the Penrose-Hameroff model of consciousness:

Sabine Hossenfelder

#77
In this interview the hostilities flow the other way. I wonder whether the interviewer could have done anything to reprieve the situation.

Famous Journalist Storms Out of Interview | "I Actively Dislike You"

Alex O'Connor
Peter Hitchens
11 oct 2023




It reminds me (tenuously) of this famous sketch:

Rowan Atkinson - Interview with Elton John

23 mar 2009

#78
General Discussion / This ruined English spelling
Last post by Charles Pegge - May 11, 2024, 10:55:23 PM
RobWords

#79
OxygenBasic / Re: demo issues
Last post by Roland Stowasser - May 11, 2024, 10:19:30 AM
Hi Charles,

thank you for the updated Oxygenbasic.zip. I only checked on Github today because I did not expect this to happen so quickly. Currently, I am trying to revise an older project that uses some macros which involve uppercase and lowercase letters. I think it is quite good that I do not have to change this writing style.
#80
OxygenBasic / Re: demo issues
Last post by Charles Pegge - May 09, 2024, 04:02:52 PM
Thanks Roland,

This is a case-sensitivity issue affecting the iif macro in the program

Here is a quick fix:

macro iif int(r, a,b,c)
'if A then R=B else R=C
if a
  r=b
else
  r=c
endif
end macro

I will fix this compiler problem properly in the next update.