[Cook] Fwd: Function Arguments (and Algebra)

Aryeh Friedman aryeh.friedman at gmail.com
Sat Oct 15 09:01:31 EST 2011


---------- Forwarded message ----------
From: Aryeh Friedman <aryeh.friedman at gmail.com>
Date: Fri, Oct 14, 2011 at 6:00 PM
Subject: Re: [Cook] Function Arguments (and Algebra)
To: Kyle Loveless <kyle.p.loveless at gmail.com>


1. There is likely no other way of direct passing but you can have a list of
the names of the input lists and then do a nested loop to read them
2. Yes see the expr built-in function (I think it is limited to the 4
arithmetic operations and even though each expression is infix the complete
one is post fix)

On Fri, Oct 14, 2011 at 5:56 PM, Kyle Loveless <kyle.p.loveless at gmail.com>wrote:

> Hi,
>
> In a function I'm writing, I want to pass in multiple lists. Is my
> instance, one is a list of include folders and the other is a list of object
> files.
>
> From what I can tell, I need to explicitly pass the size of each of these
> lists so the function can know where one list ends and the other starts. Is
> this right?
>
> Assuming this, I tried to use the "wordlist" function to extract the
> correct range from the "arg" parameter, depending on the lengths given. The
> problem I ran into with this is I need to do addition, which I realized I
> don't know how to do in a cookbook.
>
> So two questions:
> 1) If passing lists to a function, do I need to explicitly pass the lengths
> of the lists, or is there some better way?
> 2) Can I do numeric algebra in cookbooks? If so, how?
>
> Thanks!
>
> Kyle
>
> _______________________________________________
> Cook-users mailing list
> Cook-users at lists.auug.org.au
> http://lists.auug.org.au/listinfo/cook-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20111014/934fcf9e/attachment.html>


More information about the Cook-users mailing list