11-07-2007 1:40 PM
DATA text TYPE string VALUE `I know you know`.
SHIFT text RIGHT DELETING TRAILING 'no kw'.
O/P : " I know you"
Can You Explain This....How?
11-07-2007 2:04 PM
HI,
this statement will shift the string char by char for the length of comparing string number of times.if the char each time shifting right is present in the pattern it will delete and continue. else it will stop.
in this example.length of comparing string('no kw') = 4(including space)
1st right shift char is 'W' it is there in 'no kw' so it will delete and continue.
2nd right shift char is 'O' it is there in 'no kw' so it will delete and continue.
3rd right shift char is 'N' it is there in 'no kw' so it will delete and continue.
4th right shift char is 'K' it is there in 'no kw' so it will delete and continue.
5th right shift char is ' ' it is there in 'no kw' so it will delete and continue.
6th right shift char is 'U' it is not there in 'no kw' so it will stop.
rgds,
bharat.
11-07-2007 1:52 PM
Hi,
DATA text TYPE string VALUE `I know you know`.
SHIFT text RIGHT DELETING TRAILING 'ownk'.
write:/ text.
It's deleting the word containing of the alphabets k,n,o,w.
Even try for the above example.
Bye,
KC
11-07-2007 2:04 PM
HI,
this statement will shift the string char by char for the length of comparing string number of times.if the char each time shifting right is present in the pattern it will delete and continue. else it will stop.
in this example.length of comparing string('no kw') = 4(including space)
1st right shift char is 'W' it is there in 'no kw' so it will delete and continue.
2nd right shift char is 'O' it is there in 'no kw' so it will delete and continue.
3rd right shift char is 'N' it is there in 'no kw' so it will delete and continue.
4th right shift char is 'K' it is there in 'no kw' so it will delete and continue.
5th right shift char is ' ' it is there in 'no kw' so it will delete and continue.
6th right shift char is 'U' it is not there in 'no kw' so it will stop.
rgds,
bharat.