Issue
Does the distof function interpret the / divide operator and not any other arithmetic operator?
Solution
In this context, / is not interpreted as a divide operator. It actually
represents the separator for the fraction. The manner in which the distof function uses the divide operator in this situation is as designed. For example:
Command: (distof "100/2" 2)
50.0
The distof function in this case will not return nil, and the value the function returns is correct because "100/2" is a valid fraction.
Command: (distof "100 100/2" 4)
nil
In this case, because "100 100/2" is not a valid architectural fraction, the distof function returns nil.
Command: (distof "100 2/100" 4)
100.02
Because "100 2/100" is a valid fraction, the distof function returns 100.02.

Leave a Reply