Skip to main content

clone

Overloads

NameDescription
clone(string x) -> ObjectClones a string value and its variable attributes.
clone(real x) -> ObjectClones a real value and its variable attributes.
clone(List x) -> ObjectClones a list and its variable attributes.
clone(integer x) -> ObjectClones an integer value and its variable attributes.

clone(string x) -> Object

Clones a string value and its variable attributes.

Parameters

  • x: The value to clone.

Returns

A cloned string value.

Example

clone("hello")
//-> hello

clone(real x) -> Object

Clones a real value and its variable attributes.

Parameters

  • x: The value to clone.

Returns

A cloned real value.

Example

clone(1.5)
//-> 1.5

clone(List x) -> Object

Clones a list and its variable attributes.

Parameters

  • x: The list to clone.

Returns

A cloned list.

Example

clone([1, 2, 3])
//-> [1, 2, 3]

clone(integer x) -> Object

Clones an integer value and its variable attributes.

Parameters

  • x: The value to clone.

Returns

A cloned integer value.

Example

clone(42)
//-> 42