Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Message output handler.

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
uOutout(sMsg_aMsgmessage, oSelfself, cOutmethod);

Parameters

sMsg_aMsg
ParameterTypeMandatoryDescriptionUtil.js versionAPI Version
message

String

Array of String

(tick)

The message to output – either a single string or an array of strings.

1.0.8
oSelfselfSelf Descriptor Object(error)

Optional descriptor object, used to create a prefix to the message before it is output.

Example object: {file: "foo.js", ver: 1.2}

0.8cOut

Default: No prefix

1.0
methodConstant(error)

Constant defining desired output destination:

Child pages (Children Display)
excerpttrue

Default: OUT_out.DEFAULT

1.0.8

Return value

The return value of the output method will be returned (see documentation for OUT_out.* constants above for more information).

Example

Code Block
themeRDark
languagejavascript
titleOutput single line of text to console
linenumberstrue
var self = {file: "foo.js", ver: 1.2};
 
function bar() {
  uOutout("bar() called", self, OUT_out.CONSOLE);
}
 
bar(); // "[foo.js v1.2] bar() called"
Code Block
themeRDark
languagejavascript
titleMulti-line output
linenumberstrue
function foo() {
  var names = ["bob", "jim", "kate"];
  uOutout(names);
}
 
foo(); // outputs each of the names on a new line to OUT_DEFAULT
Div
classbox
Availability
Status
colourGreen
titleStable

This feature requires:

  • Util.js v0.8 and above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles:

Related APIs:

  • Chat API – allows scripts to define chat commands and conversations.
  • Diag API – allows scripts to provide diagnostic routines.
Div
classbox

Globals

Topics:

Child pages (Children Display)
alltrue
depthall
pageGlobals
excerpttrue