A hard challenge anyone?

Jim Ault JimAultWins at yahoo.com
Sat Feb 3 14:06:41 EST 2007


On 2/3/07 7:09 AM, "David Bovill" <david at openpartnership.net> wrote:
> This is an example of a general nesting problem. take a line of Revolution
> code which contains a few nested functions:
> 
>  put aFunction(bFunction(1)) + cFunction(dFunction(eFunction(fFunction(2))))

Quick question:
Is the script code you are analyzing something you wrote or someone else's?

You have posed the question of looking for functions by the parens, but you
need to consider the other construction that Rev can use to do the same
thing

put textWithoutCommas(textBlock) into newText

textWOCommasHander textBlock
put the result into newText

The first is a function, the second a handler call

function textWithoutCommas pBlock
--code lines
return pBlock
end textWithoutCommas

on textWOCommasHander pBlock
--code lines
return pBlock
end textWOCommasHander

They both do the same thing, but handlers will not be nested as functions
can be.

Jim Ault
Las Vegas

> 





More information about the use-livecode mailing list