[Cook] Function Arguments (and Algebra)

Kyle Loveless kyle.p.loveless at gmail.com
Sat Oct 15 08:56:03 EST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20111014/74bc9910/attachment.html>


More information about the Cook-users mailing list