﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4710	Cannot pass a string “parameter” that is read from a file to a function	ali.shirazi@…	Adeel Asghar	"Hello,

I have been recently experiencing an unusual warning with the new version of OM compiler (v1.12) and libraries when using the “Streams.readLine” function. I have attached a simple example to demonstrate the problem, which I suspect is a bug.

As you can see in test_line.mo, First I am trying to read line number 7 from a weather data file (i.e. weather.motab) as a string “parameter” (i.e. line7_read) and pass it to a function (i.e. getMetadata()), which leads to the following warning:

{{{
Parameter meta.line7 has no value, and is fixed during initialisation (fixed=true), using available start value (start=0.0) as default value.
 
}}}

This means that the  “line7_read” parameter is not passed to the getMetadata()  function since “meta.line7” becomes blank, that is why OM uses a default initial value (i.e. 0.0) to assign to it, which is still another bug since this is a string parameter not a real one!

However, when I manually add this line from the file to a string parameter (i.e. line7_local), the getMetadata()  function works just fine. Therefore, I reckon the problem is that a parameter value read from a file cannot be passed to a function for some odd reason.

As such, I would appreciate it if you could please try to run the attached OM file along with the weather file attached, and let me know the workaround if there is one.


Looking forward to hearing from you soon.

Regards,
Ali Shirazi"	defect	closed	high	1.13.0	Frontend	v1.12.0	fixed		
