@@ -1908,15 +1908,16 @@ function Base.show(
19081908
19091909 # Print name and description
19101910 desc = description (sys)
1911- printstyled (io, " Model " , nameof (sys), " :" ; bold)
1911+ name = nameof (sys)
1912+ printstyled (io, " Model " , name, " :" ; bold)
19121913 ! isempty (desc) && print (io, " " , desc)
19131914
19141915 # Print subsystems
19151916 subs = get_systems (sys)
19161917 nsubs = length (subs)
19171918 nrows = min (nsubs, limit ? rows : nsubs)
19181919 nrows > 0 && printstyled (io, " \n Subsystems ($(nsubs) ):" ; bold)
1919- nrows > 0 && hint && print (io, " see hierarchy(sys )" )
1920+ nrows > 0 && hint && print (io, " see hierarchy($name )" )
19201921 for i in 1 : nrows
19211922 sub = subs[i]
19221923 name = String (nameof (sub))
@@ -1940,9 +1941,9 @@ function Base.show(
19401941 next = n_expanded_connection_equations (sys)
19411942 ntot = neqs + next
19421943 ntot > 0 && printstyled (io, " \n Equations ($ntot ):" ; bold)
1943- neqs > 0 && print (io, " \n $neqs standard" , hint ? " : see equations(sys )" : " " )
1944+ neqs > 0 && print (io, " \n $neqs standard" , hint ? " : see equations($name )" : " " )
19441945 next > 0 && print (io, " \n $next connecting" ,
1945- hint ? " : see equations(expand_connections(sys ))" : " " )
1946+ hint ? " : see equations(expand_connections($name ))" : " " )
19461947 # Base.print_matrix(io, eqs) # usually too long and not useful to print all equations
19471948 end
19481949
@@ -1953,7 +1954,7 @@ function Base.show(
19531954 nvars == 0 && continue # skip
19541955 header = titlecase (String (nameof (varfunc))) # e.g. "Unknowns"
19551956 printstyled (io, " \n $header ($nvars ):" ; bold)
1956- hint && print (io, " see $(nameof (varfunc)) (sys )" )
1957+ hint && print (io, " see $(nameof (varfunc)) ($name )" )
19571958 nrows = min (nvars, limit ? rows : nvars)
19581959 defs = has_defaults (sys) ? defaults (sys) : nothing
19591960 for i in 1 : nrows
@@ -1982,7 +1983,7 @@ function Base.show(
19821983 # Print observed
19831984 nobs = has_observed (sys) ? length (observed (sys)) : 0
19841985 nobs > 0 && printstyled (io, " \n Observed ($nobs ):" ; bold)
1985- nobs > 0 && hint && print (io, " see observed(sys )" )
1986+ nobs > 0 && hint && print (io, " see observed($name )" )
19861987
19871988 return nothing
19881989end
0 commit comments