PSUmodeling / Cycles

Cycles agroecosystem model
https://psumodeling.github.io/Cycles/
Other
11 stars 0 forks source link

Error in making input file #4

Closed aramcharan closed 9 years ago

aramcharan commented 9 years ago

In Mainclass.vb code stops compiling at line op_file.WriteLine("{0,-20}{1,-3:D}", "LAST_SOIL_LAYER", Math.Min(autoIrrList(i, 3), selectedLayer))

(5th line from the end of code)

Error Message: Overload resolution failed because no Public 'Min' can be called without a narrowing conversion: 'Public Shared Function Min(val1 As ULong, val2 As ULong) As ULong': Argument matching parameter 'val1' narrows from 'String' to 'ULong'. Argument matching parameter 'val2' narrows from 'Integer' to 'ULong'. 'Public Shared Function Min(val1 As Long, val2 As Long) As Long': Argument matching parameter 'val1' narrows from 'String' to 'Long'. 'Public Shared Function Min(val1 As Single, val2 As Single) As Single': Argument matching parameter 'val1' narrows from 'String' to 'Single'. 'Public Shared Function Min(val1 As Decimal, val2 As Decimal) As Decimal': Argument matching parameter 'val1' narrows from 'String' to 'Decimal'. 'Public Shared Function Min(val1 As Double, val2 As Double) As Double': Argument matching parameter 'val1' narrows from 'String' to 'Double'. 'Public Shared Function Min(val1 As UInteger, val2 As UInteger) As UInteger': Argument matching parameter 'val1' narrows from 'String' to 'UInteger'. Argument matching parameter 'val2' narrows from 'Integer' to 'UInteger'. 'Public Shared Function Min(val1 As Byte, val2 As Byte) As Byte': Argument matching parameter 'val1' narrows from 'String' to 'Byte'. Argument matching parameter 'val2' narrows from 'Integer' to 'Byte'. 'Public Shared Function Min(val1 As SByte, val2 As SByte) As SByte': Argument matching parameter 'val1' narrows from 'String' to 'SByte'. Argument matching parameter 'val2' narrows from 'Integer' to 'SByte'. 'Public Shared Function Min(val1 As Short, val2 As Short) As Short': Argument matching parameter 'val1' narrows from 'String' to 'Short'. Argument matching parameter 'val2' narrows from 'Integer' to 'Short'. 'Public Shared Function Min(val1 As Integer, val2 As Integer) As Integer': Argument matching parameter 'val1' narrows from 'String' to 'Integer'. 'Public Shared Function Min(val1 As UShort, val2 As UShort) As UShort': Argument matching parameter 'val1' narrows from 'String' to 'UShort'. Argument matching parameter 'val2' narrows from 'Integer' to 'UShort'.

yuningshi commented 9 years ago

Amanda,

Please send me the input files that you want to convert and I will debug on my machine.

Yuning


Yuning Shi

On Mon, Mar 2, 2015 at 9:47 AM, aramcharan notifications@github.com wrote:

In Mainclass.vb code stops compiling at line op_file.WriteLine("{0,-20}{1,-3:D}", "LAST_SOIL_LAYER", Math.Min(autoIrrList(i, 3), selectedLayer))

(5th line from the end of code)

Error Message: Overload resolution failed because no Public 'Min' can be called without a narrowing conversion: 'Public Shared Function Min(val1 As ULong, val2 As ULong) As ULong': Argument matching parameter 'val1' narrows from 'String' to 'ULong'. Argument matching parameter 'val2' narrows from 'Integer' to 'ULong'. 'Public Shared Function Min(val1 As Long, val2 As Long) As Long': Argument matching parameter 'val1' narrows from 'String' to 'Long'. 'Public Shared Function Min(val1 As Single, val2 As Single) As Single': Argument matching parameter 'val1' narrows from 'String' to 'Single'. 'Public Shared Function Min(val1 As Decimal, val2 As Decimal) As Decimal': Argument matching parameter 'val1' narrows from 'String' to 'Decimal'. 'Public Shared Function Min(val1 As Double, val2 As Double) As Double': Argument matching parameter 'val1' narrows from 'String' to 'Double'. 'Public Shared Function Min(val1 As UInteger, val2 As UInteger) As UInteger': Argument matching parameter 'val1' narrows from 'String' to 'UInteger'. Argument matching parameter 'val2' narrows from 'Integer' to 'UInteger'. 'Public Shared Function Min(val1 As Byte, val2 As Byte) As Byte': Argument matching parameter 'val1' narrows from 'String' to 'Byte'. Argument matching parameter 'val2' narrows from 'Integer' to 'Byte'. 'Public Shared Function Min(val1 As SByte, val2 As SByte) As SByte': Argument matching parameter 'val1' narrows from 'String' to 'SByte'. Argument matching parameter 'val2' narrows from 'Integer' to 'SByte'. 'Public Shared Function Min(val1 As Short, val2 As Short) As Short': Argument matching parameter 'val1' narrows from 'String' to 'Short'. Argument matching parameter 'val2' narrows from 'Integer' to 'Short'. 'Public Shared Function Min(val1 As Integer, val2 As Integer) As Integer': Argument matching parameter 'val1' narrows from 'String' to 'Integer'. 'Public Shared Function Min(val1 As UShort, val2 As UShort) As UShort': Argument matching parameter 'val1' narrows from 'String' to 'UShort'. Argument matching parameter 'val2' narrows from 'Integer' to 'UShort'.

— Reply to this email directly or view it on GitHub https://github.com/PSUmodeling/Cycles/issues/4.

aramcharan commented 9 years ago

Input file attached.

On Mon, Mar 2, 2015 at 10:00 AM, yuningshi notifications@github.com wrote:

Amanda,

Please send me the input files that you want to convert and I will debug on my machine.

Yuning


Yuning Shi

On Mon, Mar 2, 2015 at 9:47 AM, aramcharan notifications@github.com wrote:

In Mainclass.vb code stops compiling at line op_file.WriteLine("{0,-20}{1,-3:D}", "LAST_SOIL_LAYER", Math.Min(autoIrrList(i, 3), selectedLayer))

(5th line from the end of code)

Error Message: Overload resolution failed because no Public 'Min' can be called without a narrowing conversion: 'Public Shared Function Min(val1 As ULong, val2 As ULong) As ULong': Argument matching parameter 'val1' narrows from 'String' to 'ULong'. Argument matching parameter 'val2' narrows from 'Integer' to 'ULong'. 'Public Shared Function Min(val1 As Long, val2 As Long) As Long': Argument matching parameter 'val1' narrows from 'String' to 'Long'. 'Public Shared Function Min(val1 As Single, val2 As Single) As Single': Argument matching parameter 'val1' narrows from 'String' to 'Single'. 'Public Shared Function Min(val1 As Decimal, val2 As Decimal) As Decimal': Argument matching parameter 'val1' narrows from 'String' to 'Decimal'. 'Public Shared Function Min(val1 As Double, val2 As Double) As Double': Argument matching parameter 'val1' narrows from 'String' to 'Double'. 'Public Shared Function Min(val1 As UInteger, val2 As UInteger) As UInteger': Argument matching parameter 'val1' narrows from 'String' to 'UInteger'. Argument matching parameter 'val2' narrows from 'Integer' to 'UInteger'. 'Public Shared Function Min(val1 As Byte, val2 As Byte) As Byte': Argument matching parameter 'val1' narrows from 'String' to 'Byte'. Argument matching parameter 'val2' narrows from 'Integer' to 'Byte'. 'Public Shared Function Min(val1 As SByte, val2 As SByte) As SByte': Argument matching parameter 'val1' narrows from 'String' to 'SByte'. Argument matching parameter 'val2' narrows from 'Integer' to 'SByte'. 'Public Shared Function Min(val1 As Short, val2 As Short) As Short': Argument matching parameter 'val1' narrows from 'String' to 'Short'. Argument matching parameter 'val2' narrows from 'Integer' to 'Short'. 'Public Shared Function Min(val1 As Integer, val2 As Integer) As Integer': Argument matching parameter 'val1' narrows from 'String' to 'Integer'. 'Public Shared Function Min(val1 As UShort, val2 As UShort) As UShort': Argument matching parameter 'val1' narrows from 'String' to 'UShort'. Argument matching parameter 'val2' narrows from 'Integer' to 'UShort'.

— Reply to this email directly or view it on GitHub https://github.com/PSUmodeling/Cycles/issues/4.

— Reply to this email directly or view it on GitHub https://github.com/PSUmodeling/Cycles/issues/4#issuecomment-76726102.

aramcharan commented 9 years ago

So the conversion worked and the input files look normal. I suppose the error message is trivial since it didn't stop the conversion. If you'd still like to debug it, let me know.

shiyuning commented 9 years ago

I found the bug and updated the conversion code, url is the same. Please do not use the old version of conversion code and update to the new version.