File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # LiveCode Builder Standard Library
2+
3+ # [ 19760] Clarify forms of log syntax in documentation
Original file line number Diff line number Diff line change @@ -473,8 +473,8 @@ begin
473473end syntax
474474
475475/**
476- Summary: Logs a string .
477- String : The string to log.
476+ Summary: Logs a value .
477+ Value : The value to log.
478478Arguments: A list of arguments.
479479
480480Example:
@@ -487,23 +487,33 @@ Example:
487487
488488 log "Widget %@ has id %@" with tList
489489
490+ Example:
491+ variable tList as List
492+ put [1,2,3,4] into tList
493+ log tList
494+
490495Description:
491- The log command triggers a logChanged message with the accumulated log messages since the logChanged message was last handled.
496+ The log command triggers a logChanged message with the
497+ accumulated log messages since the logChanged message
498+ was last handled.
492499This can be handled in LiveCode Script, for example:
493- ```
494- on logChanged pLog
495- write pLog to stdout
496- end logChanged
497- ```
498500
501+ on logChanged pLog
502+ write pLog to stdout
503+ end logChanged
504+
505+ If using the 'with arguments' form, the <Value> must be a String.
506+ Each occurrence of %@ in the String is replaced by a string
507+ representation of subsequent values in the <Arguments> List.
508+
499509Tags: Script Engine
500510*/
501511
502512syntax Log is statement
503- "log" <Message : Expression> [ "with" <Arguments: Expression> ]
513+ "log" <Value : Expression> [ "with" <Arguments: Expression> ]
504514begin
505- MCEngineExecLog(Message )
506- MCEngineExecLogWithValues(Message , Arguments)
515+ MCEngineExecLog(Value )
516+ MCEngineExecLogWithValues(Value , Arguments)
507517end syntax
508518
509519/**
You can’t perform that action at this time.
0 commit comments