diff --git a/FileCodeOutput.jl b/FileCodeOutput.jl index 46c090a..a844ed4 100644 --- a/FileCodeOutput.jl +++ b/FileCodeOutput.jl @@ -109,7 +109,7 @@ function Print3DMatrix(f,M;tabLen=0,varName="",codeStyle="C") print(f,"}"); elseif codeStyle=="Julia" - print("Array{Float32,3}(undef,"*string(size(M)[1])*","*string(size(M)[2])*","*string(size(M)[3])*");\n"); + print(f,"fill(0f0,"*string(size(M)[1])*","*string(size(M)[2])*","*string(size(M)[3])*");\n"); for i in 1:size(M)[1] Print2DMatrix(f,M[i,:,:];varName=varName*"["*string(i)*",:,:]",codeStyle="Julia"); end diff --git a/JSONPhraser.jl b/JSONPhraser.jl index 570911f..b08e034 100644 --- a/JSONPhraser.jl +++ b/JSONPhraser.jl @@ -24,7 +24,7 @@ function ReliAffixECDConverter() # Initialize with empty Array # Rank, Substats, Sequence - dataSet=Array{Float32,3}(undef,5,length(LookUpTable.substatProject),4); + dataSet=fill(0f0,5,length(LookUpTable.substatProject),4); # fill in the data for i in 1:length(dict) @@ -62,7 +62,7 @@ function ReliLevelECDConverter() end # Rank, Substats, Level - dataSet=Array{Float32,3}(undef,5,length(LookUpTable.mainstatProject),21); + dataSet=fill(0f0,5,length(LookUpTable.mainstatProject),21); for i in 1:length(dict) diff --git a/Main.jl b/Main.jl index 9b73297..ba6b9ca 100644 --- a/Main.jl +++ b/Main.jl @@ -28,7 +28,7 @@ using .JSONPhraser YourVersion= "0.1" # C(suitable for C and C++),Julia -codeStyle = "C" +codeStyle = "Julia" #=======================User configured Section==========================#