Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Print.printBuf - where does this print

Print.printBuf - where does this print

Hi,

I am trying to modify the OMC to add some features and I would like to understand how to use the Print.mo set of functions. Specifically, where does the command

Print.printBuf("xz") print its output.

Its not coming out on the console, or the OMShell interface.

anybody have an idea?

Regards

Chahé

Re: Print.printBuf - where does this print

It's printing to an external buffer (if you're used to Java, this is like a StringBuilder). You then need to retrieve this buffer and return it or print it to console (using print(str)).

Re: Print.printBuf - where does this print

Is there a way to have this printed once the OMC compiles and runs?

Or can I access this buffer from within MetaModelica with a specific command?

Possibly the Print.getString command? Looks like the right command. will try.

Re: Print.printBuf - where does this print

Print.getString is correct.

There are 0 guests and 0 other users also viewing this topic
You are here: