![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681294.webp)
1255
Text String Processing Instructions
Section 3-33
In this example, three text strings are rearranged in alphabetical order. The
original order is as follows:
D00100: Milk
D00200: Juice
D00300: Beer
When rearranged alphabetically, the order changes as follows: beer, juice,
milk.
>
<>
---
---
---
000000
000001
000002
000003
000004
>
=
<>
Address
Mnemonic
Operand
Text string ABC
Text string ABC
Text string ABC
Text string ABCD
>$
>$
Milk
Beer
Beer
Milk
Beer
Milk
Alphabetical order
Two text strings beginning with D00100 and D00200 are compared
in ASCII order from lower to higher. If the text string beginning with
D00100 is higher in ASCII order than the one beginning with
D00200, then the position of the two text strings will be reversed.
Two text strings beginning with D00200 and D00300 are compared
in ASCII order from lower to higher. If the text string beginning with
D00200 is higher in ASCII order than the one beginning with
D00300, then the position of the two text strings will be reversed.
Juice
The juice and beer
text strings are
compared and
their positions are
reversed because
J > B.
Juice
The milk and beer
text strings are
compared and
their positions are
reversed because
M > B.
Juice
The milk and juice
text strings are
compared and their
positions are
reversed because
M > J.
D00100: Milk
D00200: Juice
D00300: Beer
In this way, three text strings can be rearranged in alphabetical order.
Text string
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...