Subject: Fw: SDL-News: Request for more flexible initialisation of array!
Date: Tue Dec 02 1997 - 09:13:05 GMT
The originator of this message is responsible for its content.
-----From Kjeld.F.Christensen#dxd.ericsson.se to sdlnews -----
> -----From "Yury Chernov" <yury.chernov#ecitele.com> to sdlnews -----
> Andres paid our attention to the index types of arrays. And this is
> the root cause of the initialisation problem. Since indexes can be not
> ordered and discrete I don't think there is a proper way to initialise
> during the compilation. Andres' solution being an elegant and generic
> also can't be implemented at the compilation. So if the formal
> initialisation doesn't save real time I don't think it worth using in
> embedded and real time systems.
This kind of initialization reminds me of SQL (Not SDL although they
sound alike). Here you can insert objects into a table without knowing
the exact layout of the record.
insert into mytable (attribute1, attribute2 ... )
values (value1, value2 ... );
But one can also write
insert into mytable values (value1, value2 ... );
In the first case attribute and value are matched in the order given,
and inserted. Attrubutes not mentioned are set to null.
In the second case, the values are taken in declaration order, and if
there are more attributes in the record, than values given, the last
attributes are given the value null.
This kind of data handling is not very safe, but it shows an example of
how this kind of initialisation/assignment is handled elsewhere.
Anybody thought of using SQL as data in SDL :-) :-) :-)
-----End text from Kjeld.F.Christensen#dxd.ericsson.se to sdlnews -----
For help, email "majordomo#sdl-forum.org" with the body of your email as:
or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org
This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT