Adds the operand to the result. The result parametre represents the FIRST operand; the operand parametre the SECOND. CAUTION! Do NOT use this operation for characters! They may be concatenated by using the modify/append operation.
<node name="add_integer" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".result"/> <node name="operand" channel="inline" format="number/integer" model="2"/> </node> <node name="add_arrays_with_equal_size" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".result"/> <node name="operand" channel="inline" format="number/integer" model="1,2,3"/> </node> <node name="add_summand_to_sum" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".sum"/> <node name="operand" channel="inline" format="text/cybol-path" model=".summand"/> </node>
Name | Required | Format | Description |
---|---|---|---|
result | true | text/cybol-path | The sum resulting from the addition. It initially contains the first summand. |
operand | true | text/cybol-path | number/any | The second summand for the addition. |
count | false | text/cybol-path | number/integer | The number of elements to be calculated. If null, the operand count will be used instead. This is relevant only for arrays with more than one element. |
result_index | false | text/cybol-path | number/integer | The result index from which to start calculating. If null, an index of zero will be used instead. |
operand_index | false | text/cybol-path | number/integer | The operand index from which to start calculating. If null, an index of zero will be used instead. |
Deserialises the source into the destination, according to the given format. CAUTION! The deserialised data are APPENDED to the destination. Already existing content is NOT overwritten. Therefore, the destination possibly has to get EMPTIED before since otherwise, the new data will get appended to the already existing old data.
<node name="deserialise_number" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="2.4e-2"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/float"/> </node> <node name="deserialise_comma_separated_data" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".string"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> </node> </node> <node name="deserialise_string_taken_from_file" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="file" format="text/plain" model="path/string.txt"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> </node> </node> <node name="deserialise_inline_data" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="1;2;3;word;01/07/2022;text"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=";"/> </node> </node> <node name="deserialise_quoted_data_doubled_as_escape" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model=""begin",01/07/2022,"some ""quoted"" text""/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> <node name="quotation" channel="inline" format="text/plain" model="""/> </node> </node>
Name | Required | Format | Description |
---|---|---|---|
destination | true | text/cybol-path | The node into which the deserialised data are written. Its format (type) depends on the given source data. |
source | true | text/cybol-path | text/plain | The data to be deserialised. |
language | true | meta/language | The language used for deserialisation. |
format | false | meta/format | The format (type) of the source node. |
Name | Required | Format | Description |
---|---|---|---|
delimiter | false | text/plain | The separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv). |
quotation | false | text/plain | The marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it TWICE (doubled). Used with joined strings or character (comma) separated values (csv). |
header | false | logicvalue/boolean | The flag indicating whether or not the source data contain a header, so that the deserialiser can treat the first line differently. Used with character (comma) separated values (csv). CAUTION! It should NOT be mixed up with the headermodel property in represent/serialise. |
normalisation | false | logicvalue/boolean | The flag indicating whether or not whitespaces and line breaks are merged into just ONE space. Used with xml or html, for example. If NULL, then the default is TRUE (normalisation enabled). |
maximum | false | number/integer | The maximum number of bytes to be transmitted. Used with serial (port) interface. |
minimum | false | number/integer | The minimum number of bytes to be transmitted. Used with serial (port) interface. |
medium | false | text/cybol-path | The window to which the mouse button or keyboard key refers. It is needed to search through the hierarchy of gui elements via mouse coordinates, for a suitable action. Used with graphical user interface (gui). |
Serialises the source into the destination, according to the given format. CAUTION! The serialised data are APPENDED to the destination. Already existing content is NOT overwritten. Therefore, the destination possibly has to get EMPTIED before since otherwise, the new data will get appended to the already existing old data.
<node name="serialise_number" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="number/integer" model="24"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="serialise_week_given_as_path" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".week_as_string"/> <node name="source" channel="inline" format="text/cybol-path" model=".week"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="serialise_webpage" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".webpage"/> <node name="source" channel="inline" format="text/cybol-path" model=".wui"/> <node name="language" channel="inline" format="meta/language" model="text/html"> <node name="indentation" channel="inline" format="logicvalue/boolean" model="true"/> </node> <node name="format" channel="inline" format="meta/format" model="element/part"/> </node> <node name="deserialise_comma_separated_data" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".string_node_list"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> <node name="quotation" channel="inline" format="text/plain" model="""/> </node> </node>
Name | Required | Format | Description |
---|---|---|---|
destination | true | text/cybol-path | The node into which the serialised data are written. Its format (type) depends on the given source data. |
source | true | text/cybol-path | text/plain | number/any | The data to be serialised. |
language | true | meta/language | The language used for serialisation. |
format | false | meta/format | The format (type) of the source node. |
Name | Required | Format | Description |
---|---|---|---|
newline | false | logicvalue/boolean | The flag indicating whether or not a line break is added at the end of the printed characters. Used with text (pseudo) terminal. |
clear | false | logicvalue/boolean | The flag indicating whether or not the terminal screen is cleared before printing characters on it. Used with text (pseudo) terminal. |
indentation | false | logicvalue/boolean | The flag indicating whether or not the serialised data get beautified (pretty-formatted) by indenting the single lines depending on the hierarchy level. Used with xml or html, for example. |
delimiter | false | text/plain | The separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv). |
quotation | false | text/plain | The marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it TWICE (doubled). Used with joined strings or character (comma) separated values (csv). |
normalisation | false | logicvalue/boolean | The flag indicating whether or not whitespaces and line breaks are merged into just ONE space. Used with xml or html, for example. If NULL, then the default is TRUE (normalisation enabled). |
width | false | number/integer | The number of characters (or digits) belonging to a value. Free places get filled up with the character given in the fill property. This was defined in the original specification of character (comma) separated values (csv), in order to have fields (values) with equal width. Used with joined strings or csv. |
fill | false | text/plain | The characters (or digit) to be used to fill free places in a value whose width is greater. |
headermodel | false | text/cybol-path | The header data to be written as first line, yet before the actual content. Used with character (comma) separated values (csv). CAUTION! It should NOT be mixed up with the header property flag in represent/deserialise. |
Text data given in JavaScript Object Notation (JSON). There are three MIME assignments for json data: - application/json (official) - text/json (unofficial) - text/javascript (unofficial) Preference should be given to the OFFICIAL mime type "application/json".
<node name="data" channel="file" format="application/json" model="path/to/file.json"/>
Data given in XML format. The Extensible Markup Language (XML) version 1.0 was defined in 1998. Its structure and vocabulary can be defined freely, either as Document Type Definition (DTD) or as XML Schema Definition (XSD). If given in form of a file, then the suffix is xml in case no DTD or XSD is available. Otherwise, a suffix representing the DTD or XSD may be used. There are two MIME assignments for XML data: - application/xml (RFC 7303, previously RFC 3023) - text/xml (RFC 7303, previously RFC 3023) However, since the introduction of RFC 7303, these are to be regarded as the SAME in ALL aspects except name.
<node name="document" channel="file" format="application/xml" model="path/to/file.xml"/>
A colour whose values are given in the RGB colour model. The abbreviation RGB refers to the three colours: red, green, and blue.
<node name="value" channel="inline" format="colour/rgb" model="82,135,206"/>
A terminal colour value as written word representing the pre-defined colour name.
<node name="foreground" channel="inline" format="colour/terminal" model="blue"/> <node name="background" channel="inline" format="colour/terminal" model="white"/>
A PART node of the cyboi-internal knowledge tree. Each tree node (also called part) has a DOUBLE hierarchy representing: - model hierarchy: whole-part, container-element, macrocosm-microcosm, child parts - properties hierarchy: metadata, constraints, for example parametres of a function or the size of a graphical window
<node name="empty_part_to_be_created" channel="inline" format="element/part" model=""/> <node name="part_read_from_file" channel="file" format="element/part" model="path/to/file.cybol"/>
A PROPERTY node of the cyboi-internal knowledge tree. Each tree node (also called part) has a DOUBLE hierarchy representing: - model hierarchy: whole-part, container-element, macrocosm-microcosm, child parts - properties hierarchy: metadata, constraints, for example parametres of a function or the size of a graphical window
<node name="empty_property_to_be_created" channel="inline" format="element/property" model=""/> <node name="property_read_from_file" channel="file" format="element/property" model="path/to/file.cybol"/>
An image in Graphics Interchange Format (GIF). The file suffix is gif.
<node name="data" channel="file" format="image/gif" model="path/to/file.gif"/>
An image format defined by the Joint Photographic Experts Group (JPEG). The format itself is called JPEG as well. Data are normally stored in JPEG File Interchange Format (JFIF). Possible file suffixes are: jpeg, jpg, jpe, jfif, jif.
<node name="data" channel="file" format="image/jpeg" model="path/to/file.jpeg"/>
An image in Portable Network Graphics (PNG) format. The file suffix is png.
<node name="data" channel="file" format="image/png" model="path/to/file.png"/>
A boolean logic variable represents one of two possible states, either true or false. Sometimes, a boolean value is called a flag.
<node name="value" channel="inline" format="logicvalue/boolean" model="true"/>
The channel over which the data is sent or received. It is normally used when reading or writing a file or transfering data.
<node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="channel" channel="inline" format="meta/channel" model="inline"/>
The text encoding. It is normally used when reading or writing a file or transfering data.
<node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/>
The format in which the data is available. It is normally used when reading or writing a file or transfering data.
<node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/>
The language also called data format in which the data are structured. It is normally used when reading or writing a file or transfering data.
<node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="language" channel="inline" format="meta/language" model="text/html"/>
The cyboi-internal data model holding the actual data.
<node name="model" channel="inline" format="meta/model" model=""/>
The name of the part tree node.
<node name="name" channel="inline" format="meta/name" model=""/>
The cyboi-internal data type used to allocate memory.
<node name="type" channel="inline" format="meta/type" model=""/>
An integer with a size of just one byte. The standard type used internally is unsigned char with 8 Bits. It has a value range from 0 to 255. CAUTION! It is NOT to be mixed up with text/ascii representing a text string of characters. Numbers in an array ARE separated by comma; text characters of a string are NOT.
<node name="x" channel="inline" format="number/byte" model="0"/> <node name="y" channel="inline" format="number/byte" model="2"/> <node name="array" channel="inline" format="number/byte" model="0,1,2,3,4"/>
A complex number written in cartesian form as real and imaginary part, separated by a (plus or minus) sign. Each number can be an element of a vector (array), e.g.: - complex cartesian: 1.2e+3+0.4e-2,2-4 CAUTION! The i (or j in electrical engineering) in the imaginary part is NEGLECTED: 1+2i --> 1+2. CAUTION! Using fractions for real and imaginary part of a complex number is NOT supported, e.g. -1/2+3/4. The complex number given in cartesian form: 2 + 3i which can also be written using a j instead of i: 2 + 3j would be written in CYBOL as: 2+3
<node name="standard" channel="inline" format="number/complex-cartesian" model="2+4"/> <node name="negative_imaginary_part" channel="inline" format="number/complex-cartesian" model="2-4"/> <node name="negative_real_part" channel="inline" format="number/complex-cartesian" model="-2+4"/> <node name="both_parts_negative" channel="inline" format="number/complex-cartesian" model="-2-4"/> <node name="decimal_fractions" channel="inline" format="number/complex-cartesian" model="-1.2+5.0"/> <node name="scientific_notation" channel="inline" format="number/complex-cartesian" model="-1.2e6+.11e2"/>
A complex number written in polar form with absolute value and argument, separated by a (plus or minus) sign. CAUTION! The i (or j in electrical engineering) in the exponent is NEGLECTED: -2*exp(i45) --> -2*exp(45) The complex number given in trigonometric form: 2 (cos 30° + i sin 30°) which can also be written in exponential form, using Euler's formula: 2 e ^(i 30) would be written in CYBOL as: 2*exp(30) CAUTION! The cybol parser is able to recognise many variants, with sequence exp or capital letter E, with or without times sign, as shown in the examples below. However, the RECOMMENDED FORM is as follows: -2*exp(-45)
<node name="standard" channel="inline" format="number/complex-polar" model="-2*exp(-45)"/> <node name="with_capital_letter_e" channel="inline" format="number/complex-polar" model="-2*E(-45)"/> <node name="without_times_sign_1" channel="inline" format="number/complex-polar" model="-2exp(-45)"/> <node name="without_times_sign_2" channel="inline" format="number/complex-polar" model="-2E(-45)"/> <node name="decimal_fraction" channel="inline" format="number/complex-polar" model="-1.5*exp(-45)"/> <node name="scientific_notation" channel="inline" format="number/complex-polar" model="-1.5E4E(-45)"/>
A decimal fraction number written as floating-point number. The standard type used internally is double with 64 Bits. It has a value range from 2^−1022 to approximately 2^1024, which is from 2 × 10^−308 to 2 × 10^308. Each number can be an element of a vector (array), e.g.: - fraction decimal: 1.2,3.4,5.6 CAUTION! The cybol parser is able to recognise many variants, with small or capital letter E, with or without plus sign, as shown in the examples below. However, the RECOMMENDED FORM is as follows: 1.23E+4 The plus sign of the number is OPTIONAL. The plus sign of the scientific notation exponent is MANDATORY.
<node name="simple" channel="inline" format="fraction-decimal" model="24.0"/> <node name="negative_sign" channel="inline" format="fraction-decimal" model="-24.0"/> <node name="array" channel="inline" format="fraction-decimal" model="1.5,2.5,3.5"/> <node name="standard" channel="inline" format="fraction-decimal" model="7.0"/> <node name="lacking_decimal_places" channel="inline" format="fraction-decimal" model="7."/> <node name="lacking_pre-decimal_point_position" channel="inline" format="fraction-decimal" model=".7"/> <node name="scientific_notation" channel="inline" format="fraction-decimal" model="7e-3"/> <node name="capital_letter_possible" channel="inline" format="fraction-decimal" model="7E-3"/> <node name="positive_without_sign" channel="inline" format="fraction-decimal" model="7e3"/> <node name="optional_plus_sign" channel="inline" format="fraction-decimal" model="7e+3"/> <node name="scientific_notation_1" channel="inline" format="fraction-decimal" model="11e0"/> <node name="scientific_notation_2" channel="inline" format="fraction-decimal" model=".11e2"/> <node name="scientific_notation_3" channel="inline" format="fraction-decimal" model="0.007"/> <node name="scientific_notation_4" channel="inline" format="fraction-decimal" model="0.7e-2"/> <node name="scientific_notation_5" channel="inline" format="fraction-decimal" model="7.0e-3"/>
A fraction number written as numerator and denominator, separated by a bar (solidus, slash). Each number can be an element of a vector (array), e.g.: - fraction vulgar: 1/2,3/4
<node name="positive" channel="inline" format="number/fraction-vulgar" model="1/2"/> <node name="negative" channel="inline" format="number/fraction-vulgar" model="-2/3"/>
An integer is a datum of integral data type, a data type that represents some range of mathematical integers. It is allowed to contain negative values. The standard type used internally is int with 32 Bits. It has a value range from −2,147,483,648 to 2,147,483,647, which is from −(2^31) to 2^31 - 1. Each number can be an element of a vector (array), e.g.: - integer: 1,2,3,4
<node name="simple" channel="inline" format="number/integer" model="24"/> <node name="positive" channel="inline" format="number/integer" model="+24"/> <node name="negative" channel="inline" format="number/integer" model="-24"/> <node name="octal" channel="inline" format="number/integer" model="-030"/> <node name="hexadecimal" channel="inline" format="number/integer" model="-0x18"/> <node name="array" channel="inline" format="number/integer" model="1,2,3,4"/>
This is pure text data, sometimes called string or character array. CAUTION! Use it only when SINGLE byte characters are required, for example with BINARY data representing an image. When working with pure text, the format text/plain should be used instead, since it uses multibyte characters and allows internationalisation and the usage of unicode. CAUTION! Do NOT mix it up with "number/byte" representing NUMBERS in the range 0..255. Numbers in an array are separated by COMMA; text characters of a string are NOT.
<node name="image" channel="inline" format="text/ascii" model=""/> <node name="text" channel="file" format="text/ascii" model="path/to/file.txt"/>
A path to a node within the knowledge tree (heap memory). It may point to: - heap memory (knowledge memory tree) root . - stack memory root # - signal memory root | - model part using separator . - property part using separator : - part via index using brackets [] - part via name using parentheses () - part via referenced path using curly braces {} - stack memory variable #
<node name="stack_root" channel="inline" format="text/cybol-path" model="#"/> <node name="stack_variable" channel="inline" format="text/cybol-path" model="#x"/> <node name="part" channel="inline" format="text/cybol-path" model=".a"/> <node name="sub_part" channel="inline" format="text/cybol-path" model=".b.a"/> <node name="property" channel="inline" format="text/cybol-path" model=".b:a"/> <node name="part_by_index" channel="inline" format="text/cybol-path" model=".b.[#x]"/> <node name="part_and_property_by_index" channel="inline" format="text/cybol-path" model=".b.[.b:[.d]]"/> <node name="part_by_name" channel="inline" format="text/cybol-path" model=".(.e)"/> <node name="part_by_nested_name" channel="inline" format="text/cybol-path" model=".(.(.e)).d:p"/> <node name="node_contains_path_called_reference" channel="inline" format="text/cybol-path" model="{#path}"/> <node name="part_by_reference_and_its_child_node" channel="inline" format="text/cybol-path" model="{#path}.child"/> <node name="double_reference_path_to_path_to_part" channel="inline" format="text/cybol-path" model="{{#path}}"/> <node name="part_via_reference_and_name" channel="inline" format="text/cybol-path" model=".b.d:({#path})"/> <node name="nested_path" channel="inline" format="text/cybol-path" model=".test.node2:c.node1:b"/>
A text marked up using the Hypertext Markup Language (HTML). Common file suffixes are: html, htm, shtml, inc.
<node name="webpage" channel="file" format="text/html" model="path/to/webpage.html"/>
Text data given in JavaScript Object Notation (JSON). There are three MIME assignments for json data: - application/json (official) - text/json (unofficial) - text/javascript (unofficial) Preference should be given to the OFFICIAL mime type "application/json".
<node name="data" channel="file" format="text/json" model="path/to/file.json"/>
This is pure text data, sometimes called string or character array. The file suffix is commonly txt. The text may be encoded in various ways, which is specified in a DIFFERENT property called encoding. It is usually given when using the cybol operations send or receive.
<node name="string" channel="inline" format="text/plain" model="Hello World!"/> <node name="text" channel="file" format="text/plain" model="path/to/file.txt"/>
Data given in XML format. The Extensible Markup Language (XML) version 1.0 was defined in 1998. Its structure and vocabulary can be defined freely, either as Document Type Definition (DTD) or as XML Schema Definition (XSD). If given in form of a file, then the suffix is xml in case no DTD or XSD is available. Otherwise, a suffix representing the DTD or XSD may be used. There are two MIME assignments for XML data: - application/xml (RFC 7303, previously RFC 3023) - text/xml (RFC 7303, previously RFC 3023) However, since the introduction of RFC 7303, these are to be regarded as the SAME in ALL aspects except name.
<node name="data" channel="file" format="text/xml" model="path/to/file.xml"/>
A video in MP4 format, which is defined in RFC 4337. The file suffix is mp4.
<node name="data" channel="file" format="video/mp4" model="path/to/file.mp4"/>