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.

70 CHAPTER 3. LANGUAGE<br />

right shift of ½ that is applied ¾ times. For non-negative ½ this is equivalent to a division<br />

by ¾ ¾ . For negative ½ the result depends on the used hardware. For Ð× and Ö× the result<br />

is undefined if the second operand has a negative value or the value is larger than 32. More<br />

examples can be found in the program غÚ.<br />

3.5.7 String Operations<br />

There are several string operations available to modify, select and combine strings. Furthermore,<br />

some operations allow to convert numbers (ÖÐ and ÒØÖ) to strings.<br />

Ú°×<br />

Ú · Ú<br />

×ØÖִ׸׵<br />

×ØÖ×Øִ׸׵<br />

×ØÖÖִ׸׵<br />

×ØÖÖ×Øִ׸׵<br />

×ØÖÐÒ´×µ<br />

×<br />

×<br />

×ÔÐش׸׵<br />

string conversion<br />

concatenation of strings and addition<br />

search character in string<br />

search substring<br />

search character in string (reverse)<br />

search substring (reverse)<br />

length of string<br />

selection of one character<br />

selection of substring<br />

splitting in substrings<br />

Table 3.11: String operations<br />

° converts numbers to strings or modifies strings. The operator has two parameters: The first<br />

one (left of the °) is the number that has to be converted. The second one (right of the °)<br />

specifies the conversion. This format string consists of the following four parts<br />

Ð×Ð ÛØÔÖ×ÓÒÓÒÚÖ×ÓÒ ÖØÖ×<br />

So a conversion might look like<br />

½¿¿¾º ° ³º³<br />

Ð× Zero or more flags, in any order, which modify the meaning of the conversion specification.<br />

Flags may consist of the following characters:<br />

¹ The result of the conversion is left justified within the field.<br />

· The result of a signed conversion always begins with a sign, · or ¹.<br />

×Ô If the first character of a signed conversion is not a sign, a space character is<br />

prefixed to the result. This means that if the space flag and · flag both appear, the<br />

space flag is ignored.<br />

The value is to be converted to an “alternate form”. For and × conversions, this<br />

flag has no effect. For Ó conversion (see below), it increases the precision to force<br />

the first digit of the result to be a zero. For Ü or conversion (see below), a nonzero<br />

result has ¼Ü or ¼ prefixed to it. For , , , , and conversions, the result<br />

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

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

Saved successfully!

Ooh no, something went wrong!