CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Calling a string variable in the tui via a journal. (

Donelaria April 29, 2013 13:08

Calling a string variable in the tui via a journal.
Hello everybody,

I'm new to fluent 6.3.26, and so far, this forum helped me so much! But on this one, I can't find any answer anywhere! So here's the deal :

I'm currently learning how to code in scheme language, and how to handle the text user interface in the same time. And I dont find how to call in a journal (text user interface language) a string variable.


(define name "my_project")
(define path "C:\my_path\")
(define path_transcript (string-append path name "_transcript.txt"))


I found, the tui would see "C:\my_path\name_transcript.txt", but sadly in only sees "path_transcript"... which of course doesnt do the trick for my script, ahah.

I tried :
(display path_transcript)
(write path_transcript)

But none of these worked! :(

NB : another thing, I noticed that I couldn't end a string charactere with "\"... ? Which of course is kind of annoying when you have to set up directories of your computer... Any clue on that one?

If you have any hints, I'd really appreciate!

Thank you and have a nice day!

blackmask April 29, 2013 21:33

From the experience of other language, you might need to escape your backslash, e.g.
(define path "C:\\\\my_path\\")

Donelaria May 2, 2013 09:22

Since I didn't manage to call a variable using the tui commands, I got around the issue by using the unix command sed (aka stream editor) which is really handy to script in batch for massive search and replaces.

And in the end... I had to escape my slash indeed! So huge thanks, Blackmask, for the idea! :)

All times are GMT -4. The time now is 11:07.