Recent Posts

Pages: « 1 2 3 4 5 6 7 8 9 10 »
41
OxygenBasic / Re: o2_050P6
« Last post by Theo Gottwald on September 18, 2022, 06:01:10 AM »
Using Richedit instead of Scintilla. Please test it first.
In my tests, Richedit has disadvantages for larger files.
Trying to load large files of several Megabytes and coloring them may take several minutes then or be impossible depending on the size.
42
OxygenBasic / Re: o2_050P6
« Last post by Charles Pegge on September 18, 2022, 12:12:40 AM »
I include finded on the OxygenBasic main folder, both in script form and as a 64bit exe. It may benefit from some beauty-treatment :)

43
OxygenBasic / Re: O2 Arrays / BASIC Standardization
« Last post by Charles Pegge on September 17, 2022, 10:30:39 PM »
Hi Theo,

Iam always looking for opportunities to reduce OxygenBasics core-code! Quite a large part of the language is soft-coded in macros, which can be found in inc/self/lang.inc.

Here are familiar BASIC words which do not need to be core-coded:

Code: [Select]
true  18 -1
false 18 0
use 18 include once
uses 18 include once
using 18 include once
global 18 dim static 'global is deprecated
lobyte 18 ((%1) and 0xff)
loword 18 ((%1) and 0xffff)
hibyte 18 (((%1)>>8) and 0xff)
hiword 18 (((%1)>>16) and 0xffff)
chr_ 18 mid_
wchr_ 18 mid_

Most of the maths functions are directly coded into FPU Asm:
Code: [Select]
abs 17 fabs
acos 17 fld st0 : fmul st0 : fld1 : fsubp st1,st0 : fchs : fsqrt : fxch : fpatan
asin 17 fld st0 : fmul st0 : fld1 : fsubp st1,st0 : fchs : fsqrt : fpatan
atan  17 fpatan
atn 17 fld1 : fpatan
cos 17 fcos
deg 17 fldpi : fdivp st1 : |sp -8 : mov [rsp],180 : fimul dword [rsp] : |sp 8
frac 17 fld1 : fxch : fprem : fstp st1
hypot 17 fmul st0 : fxch : fmul st0 : faddp st1 : fsqrt
lin 17 fldln2 : fxch : fyl2x
...
44
OxygenBasic / Re: O2 Arrays / BASIC Standardization
« Last post by Charles Pegge on September 17, 2022, 09:55:27 PM »
Hi Eduardo,

My Broadband Internet has been very unstable over the last few days, so I've been producing more frequent updates, just in case I am cut-off for a prolonged period. The TestLog entries are primarily for functional testing. They give an indication of syntax, but they are not ideal examples. That will take time.

The latest 050P8 implements:

indexbase  0 or 1 as previous
#majorminor  row-major order
#minormajor  column-major order
dims  number of dimensions
elements  total number of elements
lbound  base elements (currently the same as indexbase)
ubound  max element for each dimension (adjusted with indexbase)
scaler  the multiplier used on each dimension to calculate the element location

UPDATE:
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic050P8.zip

testlog:
Code: [Select]
'17/09/2022
'multidim check
uses console
'#minormajor
'dim int d(1,2,3,4,5)
'redim int d(1,2,3,4,5)
redim int d(5,4,3,2,1)
redim int d(10,10,10,10,10)
d(1,2,1,4,5)=123
print d(1,2,1,4,5) cr
'redim int d(1,2,3,4,5)
'redim int d(60,2)
int i
for i=1 to dims(d)
  print ubound(d,i) tab scaler(d,i) cr
next
print cr

int *dd=@d
'for i=1 to ubound(d)
'print i tab dd(i) cr
'pos 80 == 0*120+1*60+0*20+3*5+1*4+indexbase
'next
wait

/*
'16/10/2022
'elements, dims
'ubound, lbound
'arwd
int cc,ee
'#show "t.txt"{
dim int d(1,2,3,4,5)
'cc=elements(d)
'ee= dims(d)
'void_ hah,hah
'indexbase 0
cc=lbound(d)
ee=ubound(d)
'}
'
'#recordof swap
'#recordof scaler
'print cc "   " ee
int i=1
'print dims(d)
'print elements(d)
'
for i=1 to dims(d)
  print " " scaler(d,i)
  'print " " lbound(d,i)
  'print " " ubound(d,i)
next
print ubound(d) " ok"
*/
45
OxygenBasic / Re: O2 Arrays / BASIC Standardization
« Last post by Eduardo Jorge on September 17, 2022, 08:00:24 PM »
Charles,
I noticed that you put the changes in oxyLog.txt
and the tests in testlog3.o2bas.
  would it be possible to do this for the released version?
I believe that this way it would be easier to locate and know what was modified for each of the versions separately,
claor is not to make the previous ones, but for each version released from now on, a separate file.

  and the tests you do would already serve as an example parameter, being necessary to put only some description for some things,
only a single file would be needed, the test.
Code: [Select]
20:23 06/09/2022 Implement multidimensional arrays (decl.inc expr.inc)
indexbase 0
int i,j
dim int a[99,9]
'#recordof a
'#show a=a[i+99,j]
'#show a=a[3,4]
'
'#show a=a[4]
'#show a=a[i]
'#show a=a[i+4]
*/
Of course I could be talking a lot of nonsense, if that's the case just ignore it, lol

I'm currently building a test macro
I don't know how I would get by without the "GOTO"

Code: [Select]
d2 = 0
          For D = -Lmin To tdS - Lmax 
               For C = 0 To 9
                    Pteste(C) = False
               Next
               '...
               For p = 0 To 9
                    If Ats_(p) Then
                         n = Dez_Ar(D + Lin_(p))
                         If dez_(p, n) Then   
                              Pteste(p) = True
                         End If
                    End If
               Next
               '...
               For p = 0 To 9
                    n = 0
                    If AtsP_(p) Then
                         '......................................
                         For C = 0 To 9
                              If Ats_(C) Then
                                   If Pteste(C) Then
                                        If Col_cc(p, C) Then n = n + 1
                                   End If
                              End If
                         Next
                         '......................................
                         If n < Min_(p) Then GoTo pulaDezena
                         '......................................
                    End If
               Next
               '...
               sd = SotAR(D)
               If saidaSotAR(d2) < sd Then
                    d2 = d2 + 1
                    saidaSotAR(d2) = sd
               End If

               '...
pulaDezena:
          Next
46
General Discussion / Re: Making one thing clear.
« Last post by Theo Gottwald on September 17, 2022, 06:55:44 PM »
Even 1945 we did not have so many "NAZIs" like are beeing declared today.
One thing is equal between Putin and old germany.
They both fight against being plundered by England and USA.
And bot hare declared evil and lots of cruelties are reported for each of them.

Here is a pictures from your Heroes in Ukraine.

If "Z"  is the "new Swastika", what does the old one mean to you as its used in Ukraine?
Did they convert to Buddhism?

For german STASI: "Die Wiedergabe dieser Bilder und Symbole erfolgt wertungsfrei nur und ausschliesslich zur geschichtlichen und persönlichen Information, Recherche und zu Bildungszwecken. Ausserdem soll hier ausdrücklich vor diesen Gestalten gewarnt werden.
Alle diese Bilder sind aus öffentlich zugänglichen Quellen und geben die Freunde der BRD-Regierung in der Ukraine wieder.


47
General Discussion / Re: Making one thing clear.
« Last post by José Roca on September 16, 2022, 03:06:33 PM »
The Serbian nazis know very well that Putin is one of them.

Graffiti in Belgrade, Serbia, reads ‘I love Russia’ and ‘Putin = Führer’. Photograph: Darko Vojinović/AP




Is "Z" the new swastika?
48
General Discussion / Re: Is Germany heading into a Electricity and Gas shortage?
« Last post by Attila Pal on September 15, 2022, 07:21:17 AM »
I beg to differ, but let's revisit this thread a few years down the road and let's discuss then.
49
General Discussion / Re: Is Germany heading into a Electricity and Gas shortage?
« Last post by José Roca on September 15, 2022, 04:58:19 AM »
Yet another conspiranoid.
50
General Discussion / Re: Is Germany heading into a Electricity and Gas shortage?
« Last post by Attila Pal on September 15, 2022, 02:05:49 AM »
It is pretty clear, the powers who shouldn't be, want to impose total control of every aspect of daily life, turning everyone into de facto slaves. For that they have to create food, energy shortages and inflation, for ppl to flock to them for handouts, which will come at a steep price, namely: your every remnants of assets and freedoms - you think you still have. Problem - reaction - solution. I really feel for all these countries affected by the upcoming dark winter.
Pages: « 1 2 3 4 5 6 7 8 9 10 »