2.2.7. Evaluation

All responses to prompts (except filenames), are "evaluated" by the Scheme interpreter before they are used. Therefore you can enter any valid Scheme expression as the response to a prompt. For example, to enter a unit vector with one component equal to 1/3 (without using your calculator), do the following:

/foo > set-xy 
x-component [1.0] (/ 1 3) 

y-component [0.0] (sqrt (/ 8 9))

You can also first define a utility function to compute the second component of a unit vector as follows:

> (define (unit-y x) (sqrt (- 1.0 (* x x))))

unit-y
/foo > set-xy 

x-component [1.0](/ 1 3)

y-component [0.0] (unit-y (/ 1 3))

Release 18.2 - © ANSYS, Inc. All rights reserved.