[r424]: / branch / coUnit / coUnit / Support / POU / Functions / TO_LOWER / svnobj  Maximize  Restore  History

Download this file

26 lines (25 with data), 2.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{attribute 'hide'}
(*
OSCAT
version 1.2	25. oct 2008
programmer 	hugo
tested by		tobias
to_lower converts a character from uppercase to lowercase
FUNCTION TO_LOWER : BYTE
VAR_INPUT
	IN : BYTE;
END_VAR
IF in > 64 AND in < 91 THEN
   TO_LOWER := in OR 16#20;
ELSIF (in > 191 AND in < 223) AND in <> 215 THEN
ELSE
   TO_LOWER := in;
END_IF;
(* revision history
hm	6. mar. 2008	rev 1.0
	original version
hm	19. oct. 2008	rev 1.1
	changed setup constants
ks	25. oct. 2008	rev 1.2
	optimized code
*)