Opened 16 years ago

Closed 16 years ago

#246 closed defect (fixed)

Foo function square no make sense

Reported by: Stephen Siegel Owned by: zirkel
Priority: major Milestone: Release 1.0
Component: Administration Version: 1.0
Keywords: function library foo Cc:

Description

It looks like it is squaring the value of the left hand side and returning that in the left hand side. It is not reading the parameter passed to the function...

		} else if (name.equals("square")) {
			// Execute square. This returns the square root of the parameter.
			
			// Huh????
			
			LHSExpressionIF lhs = invocation.lhs();
			if (lhs != null && lhs instanceof VariableExpressionIF) {
				try {
					assignValue(environment, lhs, evaluator.dynamicFactory()
							.multiply(
									environment.getAssumption(),
									environment.valueOf(evaluator.cell(
											environment,
											((VariableExpressionIF) lhs)
													.variable())),
									environment.valueOf(evaluator.cell(
											environment,
											((VariableExpressionIF) lhs)
													.variable()))), evaluator);

Change History (1)

comment:1 by zirkel, 16 years ago

Resolution: fixed
Status: newclosed

Fixed both the assignment and the comment (square, not square root).

Note: See TracTickets for help on using tickets.