« Home » « Learn » « Download » « Github »

logo

Cello High Level C

Methods

append

void append(var self, var obj);

Append the object obj to the object self.

concat

void concat(var self, var obj);

Concatenate the object obj to the object self.

Examples

Usage

var x = new(Array, Float, $F(9.9), $F(2.8));
var y = new(Array, Float, $F(1.1), $F(6.5));

show(x); /* <'Array' At 0x00414603 [9.9, 2.8]> */
show(y); /* <'Array' At 0x00414603 [1.1, 6.5]> */
append(x, $F(2.5));
show(x); /* <'Array' At 0x00414603 [9.9, 2.8, 2.5]> */
concat(x, y);
show(x); /* <'Array' At 0x00414603 [9.9, 2.8, 2.5, 1.1, 6.5]> */

Concat


Concatenate Objects

The Concat class is implemented by objects that can have other objects either appended to their, on concatenated to them. For example collections or strings.

Definition

struct Concat {
  void (*concat)(var, var);
  void (*append)(var, var);
};

Implementers

  • Array |     Sequential Container
  • List |     Linked List
  • String |     String Object
  • Tuple |     Basic Collection

Back