You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Julia wrapper is only compatible for Julia 0.4 (development version), and not compatible with Julia 0.3.
The only difference is that they changed the way to write the unsigned integer.
The old way was Uint and the new way is UInt. So while the new way should be kept for Julia 4, it would be interesting to have a version of the wrapper compatible with the current Julia release.
I tested this on Ubuntu 14.10 64bit and Julia 0.3.5 and the PropsSI function worked fine:
module CoolProp
export F2K, HAPropsSI, PropsSI, PhaseSI
function F2K(TF::Float64)
return ccall( (:F2K, "CoolProp"), Cdouble, (Cdouble,), TF)
end
function HAPropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Name3::String, Value3::Float64)
return ccall( (:HAPropsSI, "CoolProp"), Cdouble, (Ptr{Uint8},Ptr{Uint8},Float64,Ptr{Uint8},Float64,Ptr{Uint8},Float64), Output,Name1,Value1,Name2,Value2,Name3,Value3)
end
function PropsSI(Output::String, Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String)
return ccall( (:PropsSI, "CoolProp"), Cdouble, (Ptr{Uint8},Ptr{Uint8},Float64,Ptr{Uint8},Float64,Ptr{Uint8}), Output,Name1,Value1,Name2,Value2,Fluid)
end
function PhaseSI(Name1::String, Value1::Float64, Name2::String, Value2::Float64, Fluid::String)
outstring = Array(Uint8, 255)
val = ccall( (:PhaseSI, "CoolProp"), Int32, (Ptr{Uint8},Float64,Ptr{Uint8},Float64,Ptr{Uint8}, Ptr{Uint8}, Int), Name1,Value1,Name2,Value2,Fluid,outstring,length(outstring))
return bytestring(convert(Ptr{Uint8}, outstring))
end
end #module
(I only changed the UInt8 by Uint8)
The text was updated successfully, but these errors were encountered:
The current Julia wrapper is only compatible for Julia 0.4 (development version), and not compatible with Julia 0.3.
The only difference is that they changed the way to write the unsigned integer.
The old way was Uint and the new way is UInt. So while the new way should be kept for Julia 4, it would be interesting to have a version of the wrapper compatible with the current Julia release.
I tested this on Ubuntu 14.10 64bit and Julia 0.3.5 and the PropsSI function worked fine:
(I only changed the UInt8 by Uint8)
The text was updated successfully, but these errors were encountered: