Jump to content

Category talk:Wren-debug: Difference between revisions

m
→‎Source code: Typos and minor change to program comment.
(Added blurb and source code for new 'Wren-debug' module.)
 
m (→‎Source code: Typos and minor change to program comment.)
Line 117:
// 'line' indicates the line number. You can pass 0 if you don't know or care about the line number.
// A label is attached to each argument in order by splitting 'lineStr' on the vertical bar character '|'.
// If there are insufficient labels, '?' is used for the mssingmissing ones.
// If there are too many labels, excess labels are ignored.
static print(labelStr, line, arg1) { print_(labelStr, line, [arg1]) }
Line 129:
static lprint(labelStr, line, args) { print_(labelStr, line, args) }
 
// Checks that 'arg' is true or truthy (not null or false). If it is, it does nothing.
// If it isn't, it issues a message showing the label ('?' if empty) and line number (0 acceptable).
// It then aborts the fiber.
Line 173:
// Tries to run a function 'fn' which takes no arguments in a new fiber.
// Any error which occurs is captured and printed.
// Any other output is handled noramllynormally.
// An indication is given when the function ends.
static try(fn) {
9,483

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.