﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2753	Modelica.Utilities.Streams.close  not working properly (blocked by omc.exe)	Jan Kokert	somebody	"When I use the Modelica.Utilities.Streams.close(<file>) to close the file after I read some data, I still don't have access to the file (modify, rename ect.)

Try the following minimal working example! omc.exe will still block the file after simulation:
{{{
model FileStreamTest
  import Modelica.Utilities.*;

  String line;
  Boolean endOfFile;

algorithm 
  // open file and read data
  (line, endOfFile) := Streams.readLine(""D:/text.txt"", 1);
  
  // close file (NOT working)
  Streams.close(""D:/text.txt"");

end FileStreamTest;
}}}

It seems, that 
{{{
external ""C"" ModelicaStreams_closeFile(fileName);
}}}
is not working correctly.

A bugfix is important to run Modelica.Utilities.Examples.readRealParameterModel several times with different file content.

By the way: In the function readRealParameter the close command is missing at all, so I modified the
{{{""lib\omlibrary\Modelica 3.2.1\Utilities\Examples.mo""}}}.

It would help me al lot, if the file closing is working to finally realize a parametric simulation.
Thanks in advance!"	defect	closed	high	1.9.1	*unknown*	trunk	wontfix	close file Streams external C	
