22.01.2015 Views

HDevelop User's Manual

HDevelop User's Manual

HDevelop User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

76 CHAPTER 3. LANGUAGE<br />

The difference and the multiplication (square) are successively applied to each element of both<br />

vectors. Afterwards ×ÙÑ computes the sum of the squares. Then the square root of the sum is<br />

calculated. After that the dot product of ν and ξ is determined by the formula:<br />

Î ½Î¾ <br />

<br />

<br />

´Î ½ £ Î ¾ µ<br />

3.5.13 Miscellaneous Functions<br />

×ÓÖشص sorting in increasing order<br />

×ÓÖØ Òܴص return index instead of values<br />

ÒÚÖ״ص reverse the order of the values<br />

ÒÙÑÖ´Úµ convert ×ØÖÒ to a number<br />

× ÒÙÑÖ´Úµ test if value is a number<br />

ÒÚÖÓÒÑÒØ´×µ value of an environment variable<br />

ÓÖ´µ ASCII number of a character<br />

Ö´µ convert an ASCII number to a character<br />

ÓÖ×´×µ ASCII number of a tuple of strings<br />

ÖØ´µ convert a tuple of integers into a string<br />

Table 3.18: Miscellaneous functions<br />

×ÓÖØ sorts the tuple values in ascending order, that means, that the first value of the resulting<br />

tuple is the smallest one. But again: strings must not be mixed up with numbers. ×ÓÖØ ÒÜ<br />

sorts the tuple values in ascending order, but in contrast to ×ÓÖØ it returns the index positions<br />

(0..) of the sorted values.<br />

The function ÒÚÖ× reverses the order of the tuple values. Both ×ÓÖØ and ÒÚÖ× are the<br />

identity operation, if the input is empty, if the tuple is of length 1, or if the tuple contains only<br />

one value in all positions, e.g., [1,1,...,1].<br />

ÒÙÑÖ converts a ×ØÖÒ to an ÒØÖ or a ÖÐ depending on the representation. For<br />

ÒØÖ and ÖÐ it returns the input.<br />

× ÒÙÑÖ returns ØÖÙ for numbers and ×ØÖÒ if it represents a number.<br />

ÒÚÖÓÒÑÒØ returns the value of an environment variable. Input is the name of the environment<br />

variable as a string.<br />

ÓÖ gives the ASCII number of a character as an ÒØÖ. Ö converts an ASCII number to a<br />

character.<br />

ÓÖ× converts a tuple of strings into a tuple of (ASCII) integers. ÖØ converts a tuple of<br />

integers into a string.<br />

3.5.14 Operator Precedence<br />

Table 3.19 shows the precedence of the operators for control data. Some operations (like functions,<br />

, Ø℄, etc.) are left out, because they mark their arguments clearly.<br />

<strong>HDevelop</strong> / 2000-11-16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!