@True (JavaScript)
Returns the number 1.
Defined in
@Functions (JavaScript)Syntax
@True() : int
Return value | Description |
---|---|
int |
The number 1. |
Usage
For "logical" values, @functions use the number 1 for true and 0 for false. The number 1 can be represented by @True (JavaScript) or @Yes (JavaScript)Examples
. The number 0 can be represented by @False (JavaScript) or @No (JavaScript).Do
not use the JavaScript™ values true
and false
for
"logical" @function values.
function p(stuff) {
print("<<<" + stuff + ">>>");
}
if(@IsNewDoc() == @True())
p("Creating new document");
else
p("Opening old document");
/* Do not do this
if(@IsNewDoc())
p("Creating new document");
else
p("Opening old document");
*/