×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 865058, Entry date: 05/31/1999
(1)
Rate

Sample program for sorting a data block

  • Entry
  • Associated product(s)

QUESTION: -

ANSWER:
The following sample program sorts the contents of a data block by size starting with the smallest element. For this you must specify the length of the block to be sorted.

Sorting example

DBW No.

Contents of the DB before

Contents of the DB after

0

4

4

2

7

5

4

78

7

6

12

9

8

5

12

10

9

78

Parameterization

Name

Address (example)

Description

Data_DB

DB15

Data block

DB_length

W#16#A

Length of the DB

Sample call as text file:
ob1.pdf ( 3 KB )

Block as source file:
fc1_e.zip ( 673 bytes )

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.