Print debugging statement: Difference between revisions

m
m (→‎Insitux: formatting improvement)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 1,172:
 
What is generally done in practice is to hard-code some location indicator (such as the line number itself) at which a variable's value is being obtained. The Go example code then looks like this when translated to Wren.
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
 
class Point {
Line 1,236:
{{libheader|Wren-debug}}
We can also rewrite this code using the above module which, whilst still quite basic, provides a more structured approach to debugging than the first version.
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
import "./debug" for Debug
 
9,476

edits