For many problems it is not always known in advance how many copies
of an object will be. For instance, suppose I want to write a program
that will manipulate matrices, but I don't know in advance the size
of the matrix, because I don't know whether the end user needs a 2x2
matrix or a 10000x100 matrix.
At least, Oberon supports open arrays of more than one dimension, so you
can write a matrix library that will handle matrices of any size.
The feature you are looking for is called pointers to open array.
Oberon and Oberon-07 don't support this feature, but Oberon-2 and Component Pascal do.
Although they are useful for the reasons you said, they add complexity in runtime (especially in a garbage collected language).
I understand from the previous discussions that this solution is unavailable; my question was, how *does* one deal with this situation in Oberon?
On Sunday, June 3, 2018 at 8:57:17 AM UTC, August Karlstrom wrote:
At least, Oberon supports open arrays of more than one dimension, so you
can write a matrix library that will handle matrices of any size.
Thank you; that is a good point. Are you saying that it is in fact a
matter of deciding all possible dimensions in advance?
I wouldn't use a general-purpose programming language for these sorts of tasks.
I'm not saying that it solves the problem, instead the problem is moved
from the server module to the client module. Like you, I don't know what
the best approach is if your application needs to handle matrices (or
arrays) of arbitrary size. Using linked arrays is one approach.
On Sunday, June 3, 2018 at 11:44:29 AM UTC, cfbso...@gmail.com wrote:
I wouldn't use a general-purpose programming language for these sorts of tasks.
It was not my intent; it was an example of the situation.
On Sunday, June 3, 2018 at 10:58:11 PM UTC, john....@usm.edu wrote:C++ core,
On Sunday, June 3, 2018 at 11:44:29 AM UTC, cfbso...@gmail.com wrote:
I wouldn't use a general-purpose programming language for these sorts of tasks.
It was not my intent; it was an example of the situation.
Having said that, though, I should point out that most computer algebra systems
I know of, and/or whose code I've looked at, have a very large C or
and both of these are considered general-purpose, as well. Some ofthe older
ones (e.g., Macsyma/Maxima) use LISP.
On 03/06/2018 19:40, john.perry@usm.edu wrote:
Having said that, though, I should point out that most computer algebra systemsC++ core,
I know of, and/or whose code I've looked at, have a very large C or
and both of these are considered general-purpose, as well. Some ofthe older
ones (e.g., Macsyma/Maxima) use LISP.
MAS was written in Modula-2 (but never maintained, alas).
The feature you are looking for is called pointers to open array.
Oberon and Oberon-07 don't support this feature, but Oberon-2 and Component Pascal do.
Although they are useful for the reasons you said, they add complexity in runtime (especially in a garbage collected language).
--
Diego Sardina
Perhaps this is useful: https://github.com/andreaspirklbauer/Oberon-generic-heap-allocation
This brings NEW(ptr, size) to Oberon-07.
On Thursday, June 7, 2018 at 3:50:16 PM UTC+2, andreas.p...@gmail.com wrote:
Perhaps this is useful: https://github.com/andreaspirklbauer/Oberon-generic-heap-allocation
This brings NEW(ptr, size) to Oberon-07.
Thank you for the reply;I appreciate it very much. It prompted me to look more carefully at the Oberon System's setup & I noticed that it defines some methods to do this very thing (Kernel.GetBlock...(), Kernel.New()).
On Sunday, June 3, 2018 at 11:30:18 AM UTC, August Karlstrom wrote:
Like you, I don't know what the best approach is if your
application needs to handle matrices (or arrays) of arbitrary
size. Using linked arrays is one approach.
You're right. It could be done that way. Tough, though.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:24:11 |
Calls: | 6,648 |
Files: | 12,197 |
Messages: | 5,329,774 |