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
Hello. We are trying to read a JLD file directly. However, the @code_warntype gives warning that the returned result of read() is ::Any, and consequently the length of the string is also ::Any. So we guess the problem is how to specify the type of the read result. Is there anyway?
functiontest_JLD()
file =jldopen( "test.jld", "r" )
for index in1:4
test_str =read( file, "test$index" )
len =length(test_str)
if len >125println( "too long" )
end# ifend# for indexclose(file)
returnnothingend# function test_JLD@code_warntypetest_JLD()
As you can see the test_str::Any and len::Any are warned. Also the file variable, which is in the for loop, is warned file::Union{JLD.JldFile, JLD.JLD00.JldFile}.
The text was updated successfully, but these errors were encountered:
Hello. We are trying to read a JLD file directly. However, the @code_warntype gives warning that the returned result of read() is ::Any, and consequently the length of the string is also ::Any. So we guess the problem is how to specify the type of the read result. Is there anyway?
And here is the message from @code_warntype
As you can see the test_str::Any and len::Any are warned. Also the
file
variable, which is in the for loop, is warned file::Union{JLD.JldFile, JLD.JLD00.JldFile}.The text was updated successfully, but these errors were encountered: