Add or subtract two variables in TUI
Hello all
I want to do a simple math in TUI as the following: Code:
(define a pick-a-real "report surface-integrals volume-flow-rate bc1 ,,") and I got this error: Error: - (subtract): invalid argument [1]: wrong type [not a number] Error Object: #[compound-procedure] I tried also: Code:
(rpsetvar 'x (pick-a-real "report surface-integrals volume-flow-rate bc1 ,,")) and I got this error: Error: eval: unbound variable Error Object: x Anyone know what is the problem and how can I fix it? Thanks. |
Hello,
you may try this approach Code:
(define (make-new-rpvar name default type) Best regards |
Quote:
Hi, thanks for your reply. I think you misunderstood my question. I successfully define the variables, but cannot do the math on those variables! You explain how ca I define variable "x" and assign the volume flow rate of a BC to it. There is no problem in this section. However, how to add a number to "x" for instance. Why (+ x 2) won't work! |
Quote:
Code:
(rpsetvar 'x (+ (rpgetvar 'x) 2)) Best regards |
Quote:
Thank you so much. |
All times are GMT -4. The time now is 12:08. |