View previous topic :: View next topic
|
Author |
Message |
ashimprodhan
New User
Joined: 08 Dec 2006 Posts: 12 Location: Kolkata
|
|
|
|
i have a field FIELD1 with pic clause X(4) which is having the value 'ABCD'
now if i move 'XYZ' to FIELD1 what will be the displayed value of FIELD1?
XYZ or XYZD |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Character fields truncate trailing while numeric fields truncate leading (and trailing depending upon the decimal point alignment).
Character fields pad trailing spaces while numeric fields pad leading zeros (and trailing depending upon the decimal point alignment).
Result 'XYZb' where 'b' is a blank. |
|
Back to top |
|
|
vkphani
New User
Joined: 29 Oct 2003 Posts: 29
|
|
|
|
XYZ |
|
Back to top |
|
|
dnreddy
New User
Joined: 08 Dec 2006 Posts: 8 Location: chennai
|
|
|
|
Hi
output is : XYZ
One of the features of the MOVE verb is that it will pad a variable with spaces to the end if the value that is being moved into an alphanumeric field is too short to fill the field. This is convenient; it's almost always what you want. In the line MOVE "Hello" TO THE-MESSAGE, the first five characters of THE-MESSAGE are filled with Hello, and the remaining character positions are filled with spaces. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
You could not test this? |
|
Back to top |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
there is a diff b/w move and assignment operator (=); MOVE will initialize the var and then moves value....whereas '=' will juz move as it is....so if you move "XYZ" using "="...the result wlll be XYZD...please check it..if u want |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
there is a diff b/w move and assignment operator (=); MOVE will initialize the var and then moves value....whereas '=' will juz move as it is....so if you move "XYZ" using "="...the result wlll be XYZD...please check it..if u want |
What do you 'want to say' by this? Please make it clearer. |
|
Back to top |
|
|
|