[Isaac-devel] Syntax error question (Adding ')' to loop)

Pierre-Alexandre Voye ontologiae at gmail.com
Fri Aug 22 12:45:12 UTC 2008


2008/8/23 Xavier Oswald <x.oswald at free.fr>

> On 08:07 Fri 22 Aug     , Jeremy Cowgar wrote:
> > Good morning,
> >
> > I am having a slight problem figuring out this loop. I think I am doing
> it
> > correct, but Lisaac does not think so, and I'm sure it's right but I
> cannot
> > figure out what it wants.
> >
> > - min args:ARRAY[NUMERIC] :NUMERIC <-
> > (
> >   + least:NUMERIC;
> >   least := UINTEGER_64.maximum;
> >
> >   args.lower.to args.count do { i:INTEGER;
> >     ( args.item i < least ).if { least := args.item i; }
> >   };
> >
> >   least
> > );
> >
> > The error I am getting is:
> >
> > Added ')'.
> > ..... args.lower.to args.count do { i:INTEGER;
> >
> > The ^ is under { in that line. I then get the same errors for the
> > same { as Added ';' and then finally Incorrect symbol.
> >
> > Any thoughts?
>
> don't forget ';' at the end of
>
>  ( args.item i < least ).if { least := args.item i; };
>
> It can have a strange behaviour.


If you forget the ;, the compiler "think" your block send something, so the
error.

You can also use foreach :

- min args:ARRAY[NUMERIC] :NUMERIC <-
  (
   + least:NUMERIC;
   least := UINTEGER_64.maximum;

   args.foreach <http://args.lower.to/> { el : UINTEGER_64;
     ( args.item i < least ).if { least := el; }
   };

   least
);

We have also to add min and max function in collections...

>
>
> --
>  ,''`.  Xavier Oswald <x.oswald at free.fr>
>  : :' :  GNU/LINUX Debian Maintainer
>  `. `'   GnuPG Key ID 0x88BBB51E
>   `-    938D D715 6915 8860 9679  4A0C A430 C6AA 88BB B51E
>
>
> _______________________________________________
> Isaac-devel mailing list
> Isaac-devel at gna.org
> https://mail.gna.org/listinfo/isaac-devel
>



-- 
---------------------
Isaac Project - http://isaacproject.u-strasbg.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20080822/48dd01d5/attachment.htm 


More information about the Lisaac-devel mailing list