IT-Consultant: Charles Pegge > OxygenBasic

O2 Arrays / BASIC Standardization

(1/14) > >>

Eduardo Jorge:
oxygen relies on macros to work with multidimensional arrays.
 macro a(x,y) av(y*1024+x)
  dim int av[1024*1024]

  a(100,200)=42
  print a(100,200) ;42

for many this is difficult to deal with, and for projects with many arrays it is boring to create macros for each one, of course it is a tool that makes more complex things easier.
on ide they could combine to put them already distributed with oxygenbasic as easily as oxide to start.
oxygen is quite easy, so making these questions more accessible to those who are just curious but can't even make a little program work because to make the compilers work is another puzzle.

Charles Pegge:
Hi Eduardo,

You can also use a Type to define the second dimension for an array. It's an extra line of code, but no macros:


--- Code: ---'array dims using udt
type yy int x[100]
yy y[1000]
int a
int i=10
int j=20
y[i].x[j]=123
a=y[i].x[j]
print a '123
print y[10].x[20] '123

--- End code ---

You can also create arrays with mixed member types


--- Code: ---'array dims using udt
'with mixed elements
type sy
  char c[16]
  int x[100]
end type
'
sy y[1000]
string t
int a
int i=10
int j=20
y[i].c="Hello"
y[i].x[j]=123
a=y[i].x[j]
'
'Hello  123
print y[i].c "  " y[i].x[j]
print y[10].c "  " y[10].x[20]

--- End code ---

Zlatko Vid:
well that is about arrays
and what a heck is so problematic to use single arrays or UDT members for
multi-dimensions ?

Charles

I really don't know why you still keeping old AsciEdit in Scintilla folder?

PLEASE feel free and add latest release of AurelEdit to this folder.
i compiled it with SC 040 and work well !

PS..If someone need it i can try build 64bit version?

Eduardo Jorge:
Lol Charles, I think I'd rather stick with the macros.

Zlatko Vid, no problem using single arrays, not even with utd.
but when you think of tables, you think of a multidimensional array, and the standard usage you find is not that, mainly in Basic and in C, which are the bases of Oxygen.

the ease of executing a command line, creating a dll with oxygem can be a big draw for those who want simple things and are faced with the complications of making existing ide´s and compilers work.
if you attract the curious, you can attract people with more professional use and even people able to contribute.

there are several types of markets that, despite being small, if they have certain functions incorporated, could attract a lot of attention since in other platforms there are certain difficulties in implementing them.

Zlatko Vid:
Eduardo


--- Quote ---Zlatko Vid, no problem using single arrays, not even with utd.
but when you think of tables, you think of a multidimensional array, and the standard usage you find is not that, mainly in Basic and in C, which are the bases of Oxygen.

the ease of executing a command line, creating a dll with oxygem can be a big draw for those who want simple things and are faced with the complications of making existing ide´s and compilers work.
if you attract the curious, you can attract people with more professional use and even people able to contribute.

there are several types of markets that, despite being small, if they have certain functions incorporated, could attract a lot of attention since in other platforms there are certain difficulties in implementing them.
--- End quote ---

how many BASIC users need or use tables or multi-dimensional arrays?
i all current activity around BASIC dialects ..there are just graphic progies and similar mumbo-jumbo

creating .dll with Oxygen basic cannot be simplier ..much simplier in many other compilers like FB or PB
another thing is ..if someone is soo lazy and can't write
$ filename "MyDLL.dll" ....i am asking you ..is that really hard to type ???

if you attract the curious, you can attract people with more professional use and even people able to contribute.

curious...but who ?
where are former users of Powerbasic ? ..why they don't contribute in o2..
some of them go to FB ...that are just few enthusiast
where are young programmers ...beginners ..i don't see them around any BASIC dialect
and etc..etc ...

Navigation

[0] Message Index

[#] Next page

Go to full version