Re: SDL-News: Choice Primary


Subject: Re: SDL-News: Choice Primary
From: Laurent DOLDI (laurent.doldi#wanadoo.fr)
Date: Tue May 15 2001 - 10:58:10 GMT


Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From Laurent DOLDI <laurent.doldi#wanadoo.fr> to sdlnews -----

Dear Carsten,

At 11:17 15/05/01 +0200, you wrote:
>Dear experts,
>
>shouldn't the following SDL fragment be correct from a syntax point
>of view?
No.

>Both tools I use report an error when using the choice
>primary in a decision answer. I suppose this is due to =
>misinterpretation of the collon.
>...
>package foo;
>procedure choicetest;
>returns boolean;
>
> mychoice ::= CHOICE {x INTEGER, y BOOLEAN};
> dcl a mychoice;
>
> start;
> task a := x:0;
>

Try the following:

  decision a!present;
    (x): decision a!x;
            (0): return True;
            else: return False;
         enddecision;
    else: etc.
  enddecision;

Best regards,

Laurent DOLDI ** WAP site: http://tagtag/doldi **
TransMeth Sud-Ouest
27, av. SEGOFFIN 31400 TOULOUSE FRANCE
Tel.: +33 5 61 25 59 54 Fax: +33 6 07 74 87 71
Mobile: +33 6 80 26 62 31
Email: laurent.doldi#wanadoo.fr
Web site: http://perso.wanadoo.fr/doldi/sdl

--End text from Laurent DOLDI <laurent.doldi#wanadoo.fr> to sdlnews ---
For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>



This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT