GiD - The personal pre and post processor

Default parameters of a procedure


A case like the following is not valid (there is no substitution within the braces)

proc Show {{msg [_ "Error"]} {
    ...
}

It can be solved for example like this:

proc Show { {msg ""} } {
	if { $msg == "" } {
      set msg [_ "Error"]
    }
    ...
}


This would also be possible, but looks a little ugly:

proc Show [list [list msg [_ "Error"]]] {

}



COPYRIGHT © 2022 · GID · CIMNE