Aleksandra
Member
Hello everyone,
I have made a sample project with one FC, and one global DB with a few strings.
In the global DB all strings are written lowercase. In the FC block, I load the first letter of the first string, and I check if it is lowercase. Since this condition is fullfiled, I want to change it to uppercase. Here comes the problem.
OPN "Strings" // Here I open DB with strings
L 0
SLD 3
LAR1 // Here I make the pointer
L DBB [AR1,P#2.0] // Load the first character of the first string
T #FirstChar
A( // Here I check if it is lowercase
L #FirstChar // with the help of ASCII table
L 96
>I
)
A(
L #FirstChar
L 123
<I
)
JC Chng
Chng: L #FirstChar // Since the condition is fullfiled I convert
L 32 // the ASCII code of the small letter
-I // to the ASCII code of the big letter
T #ChangedChar // I transfer it to the local variable just for check
T DBB [AR1,P#2.0] // BUT, when I try to transfer it to the global DB
// it doesn't work!!!
Can anyone please help? What am I missing?
I am using STEP 7, CPU 315-2 PN/DP.
I have made a sample project with one FC, and one global DB with a few strings.
In the global DB all strings are written lowercase. In the FC block, I load the first letter of the first string, and I check if it is lowercase. Since this condition is fullfiled, I want to change it to uppercase. Here comes the problem.
OPN "Strings" // Here I open DB with strings
L 0
SLD 3
LAR1 // Here I make the pointer
L DBB [AR1,P#2.0] // Load the first character of the first string
T #FirstChar
A( // Here I check if it is lowercase
L #FirstChar // with the help of ASCII table
L 96
>I
)
A(
L #FirstChar
L 123
<I
)
JC Chng
Chng: L #FirstChar // Since the condition is fullfiled I convert
L 32 // the ASCII code of the small letter
-I // to the ASCII code of the big letter
T #ChangedChar // I transfer it to the local variable just for check
T DBB [AR1,P#2.0] // BUT, when I try to transfer it to the global DB
// it doesn't work!!!
Can anyone please help? What am I missing?
I am using STEP 7, CPU 315-2 PN/DP.