Documentation Index

I’ve not been doing much raytracing lately, but I have been making some progress with cleaning up the problems found with the subject index that’s included with the windows version documentation. At release time there weren’t enough resources available to address a long standing problem with the post processing that generates the subject index … some of the links didn’t land at the proper place. I’m encouraged with my progress so far, and I’m considering making a subject index available for the Linux/Unix and Mac OS versions as well.

OK … now for the real reason for this post. I needed a way to get a user defined function (in this example ParseTags) to return more than one value. All you need to do is use the array specification in conjunction with the return in your user defined function, then use list to pick up the returned values when you call your function.

function ParseTags ($Linesworth) {

// misc code that populated $IndexList
// and the results of the preg_replace operation on $Linesworth

return array ($Linesworth, $IndexList);
} // end of function ParseTags

// misc code that sets up the call to ParseTags

list ($Linesworth, $IndexList) = ParseTags ($Linesworth);

Pretty cool … huh!

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: