OpenModelica


Forgot password? | Forgot username? | Register

read file as a Real

read file as a Real

Hi,
I have below test.txt

2.33
3.45
2

I am read firts line of file (2.33)   with  Streams.readLine() commands.
Return value of this command  a string. But actually this value is Real parameter.
How can read this value as a Real variable?
OM have stringtoReal function or something?

Thanks

oki

Administrator has disabled public posting. Please login or register in order to proceed.

Re: read file as a Real

https://build.openmodelica.org/Document … nReal.html
OpenModelica has a stringReal function if you use the MetaModelica extensions, but you probably don't want that.

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic