|
Action:
|
Makes a law that uses the division ("/") operator.
|
|
|
Derivation:
|
division_law : binary_law : law : ACIS_OBJECT : -
|
|
|
Syntax:
|
my_law1 / my_law2
|
|
|
Description:
|
Parsing actually involves the "/" character.
my_law1 and
my_law2 can be any valid law.
my_law1 can have more than one dimension, but
my_law2 has to be one dimensional.
|
|
|
Example:
|
; law "/"
|
|
; Create a simple law.
|
|
(define my_firstlaw (law "x^2"))
|
|
;; my_firstlaw
|
|
; => #[law "X^2"]
|
|
; Create a second simple law.
|
|
(define my_secondlaw (law "x*3"))
|
|
;; my_secondlaw
|
|
; => #[law "x*3"]
|
|
; Create a third law that takes
|
|
; two laws as input arguments.
|
|
(define my_complexlaw
|
|
|
(law "law2/2*law1" my_firstlaw my_secondlaw))
|
|
;; my_complexlaw
|
|
; => #[law "X*3/2*X^2]
|
|
(law:eval my_complexlaw 2)
|
|
;; 12
|