Hi all I have downloaded latest oxygen package of 3 month ago.
There are some Problems with OpenGL folder Grafide grafide1.o2bas (works) and grafide2.o2bas (doesnt Work) and objectviewer.o2bas File and Procedure "skiplspace" causes some Errors even in all Inc Files Same folder.. and lambo.stl (3d model) missing too.. would be Glad to fix IT thanks a Lot Bye Frank
Hi Frank,
I've fixed the problem. It was in the compiler, caused by macro definitions inside class definitions within objinterp.inc.
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic07P6.zip
Oh so fast many thanks! :)
PS I have No sheep Farm for my boarder Collies only our Family lol
Hi charles, I have noticed that you have changed Last Time oxygen package building by Freebasic to self compiling.. whats the benefit of all?
I was absent for some years. I have used for a Long Time Powerbasic and liked IT very. But oxygen I love now since I have done a closer deeper Look in programming structure. Respect because I have No Idea of Assembler Code.
My Intention was to create a 3d modeller but was Always unsatisfied of Other compilers they we're Handling too complicated or failed Support...
I am only asking what disadvantage you can observe of a self compiling oxygen Basic language... Thx
Bye Frank
Self-compiling has many advantages, for instance having subroutines, and large strings. o2 has no dependencies apart from the Windows API. So o2 and all its tools are written in one language.
The main disadvantage is not being able to move to another non-MS platform. I see that most compilers/interpreters ride on the back of GCC. They are written in C or C++ and take advantage of GCC linkage to a host of different platforms and processors.
Thanks Charles for Infos. The gnu Compiler collection is an interesting stuff indeed. I have visited joined an IT Course some years ago with c++ and Java python language beside economic Lessons and knowledge. Most of These languages are pre defined unflexible not Open and thats a Point I dont Like and too big..
My knowledge about Linux Unix etcpp are however Zero.
So its Not possible to Convert oxygen for example to Linux because of necessary
and depending Windows API?
Best regards
Time is the problem. In anticipation, I have a Raspberry Pi 4, which uses ARM processors and runs Linux. But for graphical apps, I think MS/PCs will always have the lead.
A self compiling package has the advantage of automated Testing.
As a Compiler is a complex tool itself, by compiling itself you already tested large parts of it.
Testing and debugging is often the largest part of programming.
How do you see that Charles?
Yes, Self compiling is very sensitive to deeply hidden errors. It's a good test of integrity, though it won't include all the language features. For instance it does not use floating-point maths or OOP.
For the 07P7 version, thank you Charles !
Hi Charles.
I renew my greetings to you and all the readers of the forum.
It's been a while since I was able to do anything because of so many family commitments.
Anyway thank you so much for everything you do... It's really excellent. Just as I really appreciate the various interventions of the dear friends of forum who actively intervene.
I downloaded version 7P7, but I was surprised that window defender finds a virus....
Cheers
Thanks Pierre and Nicola.
Sometimes, I also get problems from Windows security with a new build. I have to get it to override the quarantine and restore oxygen dll. But it does not happen very often.
You can download the Setup-Version, which contains files that are digitally signed.
These files will not make you problems, even in an company environment.
Ok Charles,
I took the liberty of sending the files they considered infected to the Window Defender team...: The answer is that THEY ARE NOT MALWARE!
I enclose their response.
It looks like they'll also remove control over the files in question.
Cheers
Thanks Theo and Nicola. I don't anticipate further changes to the core binary, but Windows Security may change its detection algorithms occasionally, and cause problems.
Good morning Charles hi all
Any News about next oxygen Update?
Good Luck and Progress
Regards Frank
I've just released 07P9
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic07P9.zip
https://sourceforge.net/projects/oxygenbasic/postdownload
mostly technical but improved
redimQuoteRELEASE 0.7.0P9 21/12/2023
20:52 19/12/2023 Support C-style multidim x[..][..].. (rarray fixsqbr)
09:06 19/12/2023 Support C-style if(..) / While(..) for(...) single statement (tran.inc captsr)
22:26 09/12/2023 Restore Remap (lang.inc)
21:39 08/12/2022 Fix sub-array indexing (expr.inc arcc=0)
17:48 02/12/2023 New Instrp pattrn search '*' '?' (parseutil.inc)
17:45 02/12/2023 Rework Inkey and Get. Make KeyRecord available (console.inc)
18:51 30/11/2023 Create Ogl.inc to contain Opengl Headers
22:44 23/11/2023 Fix operator finding (meta.inc findop)
22:27 16/11/2023 Redesign redim and array_mep
22:27 16/11/2023 Revoke overlay
22:27 16/11/2023 Redesign dim attributes table (ubound)
02:46 14/11/2023 Fix ubound() and elements() for 1d arrays (decl.inc lang.inc)
Thank you Charles :)
Here is a demo of a redim array being passed to a function:
'PASSING A REDIM ARRAY
'CP 22 Dec 2023
uses console
def show
print "%1" tab %1 cr
end def
'
function f(int *rr[redim])
==========================
print "carried param dimensions" cr cr
show (ubound(rr))
show (ubound(rr,1))
show (ubound(rr,2))
show (ubound(rr,3))
print cr
redim int rr(4,3,4) 'expand array
end function
'
'
redim int r[2,3,4]
print "initial dimensions" cr cr
show (ubound(r))
show (ubound(r,1))
show (ubound(r,2))
show (ubound(r,3))
print cr
f(r)
print "altered dimensions after call" cr cr
show (ubound(r))
show (ubound(r,1))
show (ubound(r,2))
show (ubound(r,3))
print cr
'
print "ok" cr
wait
This version also supports C-style multidimensional arrays:
dim int a[1][2][3]
'19/12/2023
dim int a[1][2][3]
int b
'print dims(a)+" "+ubound(a)
a[1,1,2]=34
print a[1,1,2]
b=a[1][1][2]
print b
Thank Charles! :-)
@Charles, does it support redimension without destroying the content?
Which will need you to internally move the data to a temporary array and then copy them back.
This would be an interesting feature.
Yes Theo,
The content is preserved by default. The dynamic array content is held in an OleString, so it can be manipulated like a string.
To clear the content:
redim int v[n] clear
wow Charles, this is new.
Very good!
hello everyone, with a stone age computer here,
Charles Pegge would it be possible to use the oxygen dll from within vba and have values returned?
Hi Charles.
Is Reindex still supported? If so, could you explain its use?
Cheers
Hi Eduardo,
It's probably best to use Oxygen to develop DLLs that interface with VBA for your data processing.
Hi Nicola,
Reindex takes a a filter macro and a sort macro, and data count. It does not touch your primary data, but produces index arrays for the data. It is primarily designed for database work.
Here is a test example:
'09/12/2022
'REINDEX TESTS
uses console
'indexbase 0
'int d={9,8,7,6,5,4,3,2,1,0}
'int d={8,9,6,7,4,5,2,3,0,1}
redim int d(100)
d={8,9,6,7,4,5,2,3,0,1} 'raw data
redim int d(10)
int m=10
'
macro filter(r,i)
=================
if d[i]>=5
r=1
endif
end macro
'
macro compare(r,i,j)
====================
'if d[i]>d[j] 'ascending
if d[i]<d[j] 'descending
r=1
endif
end macro
'
reindex idx,m,n,filter,compare
'
' idx index to be created
' m count of data elements
' n count of resulting index
' filter filter macro
' compare comparison macro
'
'PARTIAL USE OF REINDEX
'reindex idx,m,n,filter
'reindex idx,m,n,,compare
'reindex idx,m,n
'reindex idx,m : int n=m
'
'RESULTS
'=======
print "total " n cr cr
print "#" tab "INDEX" tab "DATA" cr
int i,j
for i=indexbase to n+indexbase-1
j=idx[i]
print i tab j tab d[j] cr
next
print cr cr
del idx
wait
Thanks Charles.
Another clarification: how is the behavior of "clear" with string arrays? In a previous note you wrote "to flush an array's contents, redim it with 0 elements first. But avoid doing this with arrays of strings; the orphaned strings are not garbage-collected until the end of the program, and will accumulate on each iteration where the redim reduces the number of elements."
This has been improved. The old strings are now flushed from memory, and replaced with new null strings. Similarly, the destructors of objects are invoked, and each object is initialized by its constructor, wherever these procedures are defined.
redim reindex new and del are all macros defined in inc\self\lang.inc as outer core commands.
Redim in the new help file
@Charles Pegge, does it mean i can redim a multidimensional array on any dimension and the internal content is moved in memory as it should to fit the new size?
Redim uses a simple block copy to preserve the data, so you have to be careful when redefining dimensions.
You can also use another closely related construct remap, which allows you to access any buffer or block of data in terms of new dimensions
for instance:
redim int d(10000)
remap byte b(10000,4)
@b=@d
d[7]=0x103
print b[7,1] '3
print b[7,2] '1