I am incredibly new to Julia, as in I downloaded it yesterday. I need to use structs for a project I am trying to start. I need my objects to consist of attributes that are part of the input and attributes that are calculated from that input. For example, I tried:
struct Bar
#Attributes from input
E::Float64
A::Float64
L::Float64
# Attributes calculated form input
k = (E*A/L)*[1.0 -1.0; -1.0 1.0]
end
but I get an error:
ERROR: LoadError: syntax: "k = (((E * A) / L) * [1 -1; -1 1])" inside type definition is reserved around Untitled-1:10
How should I go about achieving my desired outcome?