Array pointers like C++
Hi,
I am struggling with translating some code from C++ to Delphi.
Consider this C++ code:
class var:
double someArray[2][4][6];
local method vars:
int a, b, c, d, e;
.... // vars initialized
double *l = someArray[a][b];
double p = l[c] = (double) d/e;
l[0] = p;
What is actualy happening here? is someArray changed in the local method?
How can I do this in Delphi, or Object Pascal in general?
Bjorn
.
Relevant Pages
- Re: Algorithm/Component for Timetable arrangement
... You want a basic structure to implement CSP in Delphi for rostering? ... // start by allocating staff to first shift ... // setup vars, copy temp vars to local stack, etc ... (borland.public.delphi.thirdpartytools.general) - Re: Delphi vs Web/Scripting Languages
... They do not see all local vars, ... If Delphi really would get any of this, it might have a different impact on certain classic features. ... What I had written was an explicit syntax to declare vars, they just do not *have* to be explicitly typed, and do not have to be thrown at the top. ... (borland.public.delphi.non-technical) - Re: (compiler error): symbol is not linked in executable
... store it to a local variable this come empty. ... However, is rare, but vars ... The open source, full features Indexing, searching engine for Delphi ... (borland.public.delphi.non-technical) - Re: dynamic vs. static: the age-old debate
... a bignum type in OCaml that has the same operations as ints (including ... def eval(self, vars): ... definitions were the Int and If classes: ... All the standard arithmetic operations as well as all standard numeric ... (comp.lang.misc) - Re: dynamic vs. static: the age-old debate
... let rec eval vars = function ... they only share practically all arithmetic operations as ... There are semantic differences between int and float for almost all ... (comp.lang.misc) |
|