[Isaac-devel] Variable Arguments
Xavier Oswald
x.oswald at free.fr
Sat Aug 23 14:34:23 UTC 2008
On 10:09 Fri 22 Aug , Jeremy Cowgar wrote:
> I'm sorry to be so needy right now. In time I'll get some of this down.
> Right now I am reading on Page 73 of the manual
> (http://isaacproject.u-strasbg.fr/download/Lisaac_RM_03.pdf) and it
> speaks of Variable-argument lists (3.6.4). It has an example:
>
> - add list:FIXED_ARRAY[INTEGER] <-
> (
> (list.lower).to (list.upper) do { j:INTEGER;
> add_last (list.item j);
> );
>
> I've created a simple use of this with the min function I am trying to
> make work. Here is my entire code:
>
> Section Header
>
> + name := MYMIN;
>
> Section Private
>
> - min_integer args:FIXED_ARRAY[INTEGER] <-
> (
> + least:INTEGER;
> least := INTEGER.maximum;
> args.foreach { el:INTEGER;
> ( el < least ).if { least := el; };
> };
> least.print;
> );
>
> Section Public
>
> - main <-
> (
> min_integer(1,2,3);
> );
>
> When I compile this, I get the following errors:
>
> $ lisaac mymin.li
> Depending pass: ..--SEMANTIC---------
> Incorrect vector size.
> Line 7 column 19 in MYMIN(./mymin.li):
> - min_integer args:FIXED_ARRAY[INTEGER] <-
> ^
>
> Line 21 column 14 in MYMIN(./mymin.li):
> min_integer(1,2,3);
> ^
>
> Any thoughts?
For everybody who don't know...
This feature is not yet implemented, it's in progress in order to have a
unlimited parameter list.
FIXED_ARRAY is deprecated and has been replaced by FAST_ARRAY.
Greetings,
--
,''`. 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
More information about the Lisaac-devel
mailing list