Recent posts

#91
OxygenBasic Examples / Inner function
Last post by Frank Brübach - June 30, 2024, 09:07:17 AM
Good morning

I have found this little old oxygen example and would Like to fix IT but how? Do you have another inner function example for me Charles? Thanks, Frank

' inner function example
' oxygen, old example
'
uses console

printl "ok"

'---------------------------
function myfun(int k) as long
'===========================
local int v,a,c
static int b
a=k
c=20000
b=4

printl "ok1"

'function abc(int k) as long = k*20 ' doesn't work
function abc(int k=k*20) as long
int a
'--------------------- //
'print str abc a ' error
'--------------------- //
end function

function abc(int k) as long (function=10+k*10)
'--------------------- //
'print str abc a ' error
'--------------------- //


function abc(byval v as long) as long (local c=13 : function=k*3+b+c )
'--------------------- //
'print str abc a ' error
'--------------------- //

function f(int k) as long
(
local int c=17
function=c+k*3
)


function=0
end function

printl "ok2"

print myfun(1)
wait
#92
General Discussion / What will they think about us ...
Last post by Charles Pegge - June 30, 2024, 05:16:56 AM
Sabine Hossenfelder

#93
Dr. John Campbell
20 jun 2024

#94
General Discussion / "Godfather of AI" Geoffrey Hin...
Last post by Charles Pegge - June 28, 2024, 08:42:38 PM
60 Minutes
9 oct 2023




Geoffrey Hinton | On working with Ilya, choosing problems, and the power of intuition
Sana
20 may 2024


#95
General Discussion / I don't think we can control A...
Last post by Charles Pegge - June 28, 2024, 12:27:39 PM
Sabine Hossenfelder

#96
OxygenBasic / Re: The 'shared' statement
Last post by Charles Pegge - June 28, 2024, 11:16:41 AM
I'm looking at some ancient PB code of 30 years ago. It was a complete DOS based DBaseIII-like application.

sample procedure:
sub scrolls(v$,v%,y%,yo%,x%,xo%)
shared fcol%,bcol%
m%=1
call wordval(v$,m%,v%)
call wordval(v$,m%,y%)
call wordval(v$,m%,yo%)
call wordval(v$,m%,x%)
call wordval(v$,m%,xo%)
call word(v$,m%,w$):if lw% then fcol%=val(w$)
call word(v$,m%,w$):if lw% then bcol%=val(w$)
end sub
#97
OxygenBasic / Re: The 'shared' statement
Last post by Zlatko Vid - June 28, 2024, 07:52:59 AM
also freeBasic and qb64 use it
so you may attract fauna on this way ...maybe
#98
OxygenBasic / Re: The deprecation of mode64b...
Last post by Charles Pegge - June 28, 2024, 02:03:55 AM
Correct. The changes were made to some inc files in the library and to some o2bas demo files. The compilers were also recompiled but no change to their source code.
#99
OxygenBasic / Re: The deprecation of mode64b...
Last post by James C. Fuller - June 28, 2024, 12:25:52 AM
Charles,
  Latest Upload has the same version (2024-06-18T14:12:57) as the last one.
James