View previous topic :: View next topic
|
Author |
Message |
anilbhuvan
New User
Joined: 18 Nov 2006 Posts: 4 Location: hyderabad
|
|
|
|
HI FRNDS,
i have 01 A PIC X(2).
01 B PIC 9(2).
MOVE 12 TO A.
MOVE A TO B.
I KNOW THAT I CAN PASS NUMERIC TO NON-NUMERIC BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED.....
Warning: Caps Lock On |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Anil,
Please post your query in CAPS OFF mode.
Quote: |
BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED..... |
I dont know you are confused or not. But your post surely is confusing. Please post your exact requirment.
Also let us know, is it atypoerr? |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
hi anil ,
Use the below code
Code: |
COMPUTE B = FUNCTION NUMVAL(A) |
Thanks
Sai |
|
Back to top |
|
|
chtrisa
New User
Joined: 19 Dec 2006 Posts: 12 Location: chennai
|
|
|
|
hi anil,
i think, redefine the B(numeric) field, then u can move non mumeric value to B. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
This moves literal '12' to A and your move will move 12 to A. (Check the apostrophes.)
I think you are confused in diffrentiating numeric and alphanumeric literals. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
hi anil,
anil wrote:
Quote: |
I KNOW THAT I CAN PASS NUMERIC TO NON-NUMERIC BUT IN THIS CASE HOW CAN IT BE PASSED AS NUMERIC OR NON-NUMERIC..... I KNOW ITS BASIC ONE BUT I WANT UR HELP AS I WAS CONFUSED..... |
I think that you are talking about the second move whether numeric value will be moved to 'B' or alphanumeric.
you are moving '12 ' to alphanumeric first since it is in codes it will be treated as alphanumeric.
when you move A to B it will be moved fine and you can use B for any arithmetic operations as well. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
|