[ic] Safe: Search pattern not terminated (?)

Mike Heins mikeh@minivend.com
Sat, 2 Dec 2000 00:18:25 -0500


Quoting Michael Schwartz (michael@panamacom.com):
> Hi,
> I have a simple small code in MV4, in a page called calculate.html,  like
> this:
> 
> <FORM ACTION="[process-target]" METHOD=POST>
> <INPUT TYPE=hidden NAME=mv_doit VALUE=return>
> <INPUT TYPE=hidden NAME=mv_nextpage value=calculate>
> [seti resol]
> [calc] ([value variable1] / ([value variable2] * [value variable3])) [/calc]
> [/seti]
> [scratch resol]

This is a simple Perl problem -- you would be better off just to use
the normal objects.

[calc]
    for( 'variable1', 'variable2', 'variable3') {
	return unless length $Values->{$_};
    }
    unless ($Values->{variable1} && $Values->{variable2}) {
	    return "divide by zero error";
    }
    return $Values->{variable1} / ($Values->{variable2} * $Values->{variable3} );
[/calc]

Interchange cannot program for you. Well, I guess you got it done. 8-)

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman