augenstern
Member
First of all: hello to all the people in that board!
I'm a S7-SCL neewbie (programming practice in C/C++ for now over 20 yrs, though)
I'm really badly miss pointer and other fine things of C.
One of my problems:
I have to use ANYPOINTERS in SCL. Well how it works is quite fine, but practical usage is pretty hard.
I could use a DB for every used datastruc, but for some reasons I have to be very cheap in using DBs.
So I set up one (fairy large) DB that contains all of my data.
Problems:
- how can I get the
startadress of some data within the DB at RUN-Time?
- how can I get e.g. the size of a byte-array at RUN-Time
I'm talking about such handy things like offsetof() or sizeof()
in C.
Of course, I could code this at compile-time, but I need to dynamically get those things at RUNTIME!
Is that possible, at all?
example:
anyarray : ARRAY[0..127] OF BYTE;
i := sizeof(anyarray) ???
I'm a S7-SCL neewbie (programming practice in C/C++ for now over 20 yrs, though)
I'm really badly miss pointer and other fine things of C.
One of my problems:
I have to use ANYPOINTERS in SCL. Well how it works is quite fine, but practical usage is pretty hard.
I could use a DB for every used datastruc, but for some reasons I have to be very cheap in using DBs.
So I set up one (fairy large) DB that contains all of my data.
Problems:
- how can I get the
startadress of some data within the DB at RUN-Time?
- how can I get e.g. the size of a byte-array at RUN-Time
I'm talking about such handy things like offsetof() or sizeof()
in C.
Of course, I could code this at compile-time, but I need to dynamically get those things at RUNTIME!
Is that possible, at all?
example:
anyarray : ARRAY[0..127] OF BYTE;
i := sizeof(anyarray) ???