Subject: Re: SDL-News: Request for more flexible initialisation of array!
From: Rossitza Goleva (rig#vmei.acad.bg)
Date: Mon Dec 01 1997 - 18:55:22 GMT
The originator of this message is responsible for its content.
-----From "Rossitza Goleva" <rig#vmei.acad.bg> to sdlnews -----
What you propose for arrays in SDL 2000 is interesting but difficult to be
done. It will be even more difficult with STRUCT constructs in SDL. Anyhow
I think that the construction for DCL is fine and very useful if one would
like to simulate SDL program. Task cunstructs is difficult to be supported.
Rick Reed's questions:
a) To have or not larger index values is a matter of option in given SDL
supported tool not a matter of SDL BNFs definitions.
I think that it will be very useful to allow arrays indexes to be Integer,
PID, String, Character. For example imagine you create set of process
instances and put all the OFFSPRING values to the array of PID. Imagine
that all the created process instances also create set of process instances
and also put OFFSPRING to the array of PID. Addressing these instances will
be easier if we have array of PID and array of PID with index PID.
Double (triplle) arrays also can be of great use.
b) holes should be allowed.
c) I agree that the proposed syntax is ambiguous.
Sincerely yours, Rossitza Goleva.
Dipl. Eng. Rossitza Ivanova Goleva, Assistant-Professor
Department of Telecommunications, Faculty of Communication Technology
Room 1449, Technical University of Sofia, Sofia, 1756, Bulgaria
Fax: +359 2 68 60 89
Tel: +359 2 636 3251 +359 2 20 14 11 home
> From: Rick Reed TSE <rickreed#tseng.co.uk>
> To: dagbjorn#telox.no
> Cc: sdlnews#sdl-forum.org
> Subject: Re: SDL-news: Request for more flexible initialisation of array!
> Date: неделя, Ноември 30, 1997 01:26
> The originator of this message is responsible for its content.
> -----From Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews -----
> At 14:10 +0000 28/11/97, dagbjorn#telox.no wrote:
> >The originator of this message is responsible for its content.
> >-----From dagbjorn#telox.no to sdlnews -----
> >There is an annoying restriction wrt initialisation of arrays which
> >I would like to see removed in SDL-2000. In current version of SDL,
> >it is only possible to initialise all elements of an array to one and
> >the same value. To initialise each element to a different value, a
> >of tasks must be specified which are executed in run-time. Cumbersome
> >and expensive!
> >If an array type is defined which may contain up to 12 integers, I
> >would simply like to write:
> >DCL daysOfMonth Int12ArrType := (. 31, 28, 31, 30, 31, 30, 31, 31, 30,
> >31, 30, 31 .);
> >TASK daysOfMonth := (. 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
> >instead of 12 task statements like
> >TASK daysOfMonth(1) := 31,
> > daysOfMonth(2) := 28,
> > ...
> >It should be allowed to only initialise an array partly.
> Thank you for this contribution. The reason that such a construct was not
> included earlier because the current data model requires all elements to
> receive valid values. However, perhaps the new data model may not need
> I forsee some issues that need to be addressed:
> a) what if the index is large (or even uncountable - such as Integer)?
> b) should "holes" be allowed in the array value?
> c) the proposed syntax is probably syntactically ambiguous with the
> construct which will still be needed.
> Effectively what you are proposing is another construct for an array
> (rather than a constant) so that in the example you give a valid value
> would be:
> (. 31, 28, daysOfMonth(1), 30, daysOfMonth(i), 30, 31, 31, 30, 31, 30, 31
> Rick Reed, TSE Limited
> 13 Weston House, 18-22 Church Street
> Lutterworth Leicestershire LE17 4AW United Kingdom
> Tel +44 14 55 55 96 55; Fax +44 14 55 55 96 58
> email: rickreed#tseng.co.uk
> http://www.tseng.co.uk ftp://ftp.tseng.co.uk/tseng/
> -----End text from Rick Reed TSE <rickreed#tseng.co.uk> 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:
-----End text from "Rossitza Goleva" <rig#vmei.acad.bg> 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