CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Scheme Programing in FLUENT ! How to use a variable in an Loop ? (https://www.cfd-online.com/Forums/fluent/182440-scheme-programing-fluent-how-use-variable-loop.html)

Malue January 10, 2017 03:06

Scheme Programing in FLUENT ! How to use a variable in an Loop ?
 
Hello,

I would like to use a string-variable in a do-loop !

; the list I would like to use in the loop
(define myList '(2 4 6))

; the loop
(do ((x 1 (+ x1))) ((> x2)

(ti-menu-load-string (format #f "define/materials/change-create/RPE RPE n n y (list-ref myList ~a) " x))

)


ERROR message : (list-ref myList 2) Invalid string/symbol.

Thanks a lot for your help !!!


All times are GMT -4. The time now is 09:54.