From ef4d4bcae2c4b14286ca3d9a75bb23ffe8720deb Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Mon, 20 Jun 2022 14:11:55 +0200 Subject: [PATCH] amended outer constructor for Settings() --- src/constructors.jl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/constructors.jl b/src/constructors.jl index 556cfea..539e8eb 100644 --- a/src/constructors.jl +++ b/src/constructors.jl @@ -18,16 +18,15 @@ julia> my_settings = Settings() # will generate default settings Settings(:mass_point, :distance, 20, 3, :running_time, :dataframe) ``` """ -function Settings(file="DEFAULT") - - ## default values - massModel = :mass_point - stepVariable = :distance - stepSize = 20 - approxLevel = 3 - outputDetail = :running_time - outputFormat = :dataframe - +function Settings( + file = "DEFAULT"; + massModel::Symbol = :mass_point, + stepVariable::Symbol = :distance, + stepSize::Number = 20, + approxLevel::Number = 3, + outputDetail::Symbol = :running_time, + outputFormat::Symbol = :dataframe + ) ## load from file if file != "DEFAULT"