Quirrel4.41.0

types.Bool.clone

Method on every bool
clone(): any

Returns the bool itself.

Return value

this, unchanged, for the same reason as types.Integer.clone.

Notes

Takes no arguments. clone is a keyword, so true.clone() never parses; see types.Integer.clone for the operator and computed-index alternatives.

Example

examples/types/bool/clone.nut
println("clone true =", clone true)
let x = true
println("x[\"clone\"]() == x =", x["clone"]() == x)
Output:
clone true = true
x["clone"]() == x = true

See also

cloneReturns the integer itself.
cloneReturns the float itself.
weakrefReturns the bool itself.
boolclass index