All Functions Modules Pages
channel

Functions

CHANNEL channel.new (STRING name)
 Creates a new channel or retrieves an existing one, with the specified name. More...
 
CHANNEL channel.get (STRING name)
 Searches an existing channel with the especified name. More...
 
NIL channel.push (CHANNEL ch, STRING value)
 Sends an element to the channel's queqe. More...
 
STRING channel.pop (CHANNEL ch)
 Retrieves an element and deletes it from the channel's queqe. More...
 
NUMBER channel.available (CHANNEL ch)
 This gets the number of elements on the channel's queqe. More...
 
NIL channel.clear (CHANNEL ch)
 Deletes all the elements on the channel's queqe. More...
 

Detailed Description

Channel management (Data conections between strings or processes).

Function Documentation

CHANNEL channel.new ( STRING  name)

Creates a new channel or retrieves an existing one, with the specified name.

Parameters
nameChannel name.
Returns
A channel type object, ready to use or nil in case of error.
CHANNEL channel.get ( STRING  name)

Searches an existing channel with the especified name.

Parameters
nameChannel name.
Returns
A channel type object, ready to use or nil in case of non existing.
NIL channel.push ( CHANNEL  ch,
STRING  value 
)

Sends an element to the channel's queqe.

Parameters
chA channel type object.
valuecould be a STRING, NUMBER, BOLL o NIL.
Returns
Nothing.
STRING channel.pop ( CHANNEL  ch)

Retrieves an element and deletes it from the channel's queqe.

Parameters
chA channel type object.
Returns
The element could be a string, number, bool o nil, if there is no elements on queqe, will return nil.
NUMBER channel.available ( CHANNEL  ch)

This gets the number of elements on the channel's queqe.

Parameters
chA channel type object.
Returns
The number of available elements on the queqe.
NIL channel.clear ( CHANNEL  ch)

Deletes all the elements on the channel's queqe.

Parameters
chA channel type object.
Returns
Nothing.