View previous topic :: View next topic
|
Author |
Message |
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi all,
Can anybody plz explain how the system storing the values of redefines variable?
Thanking You, |
|
Back to top |
|
|
shivani_tech Warnings : 2 New User
Joined: 08 Jan 2006 Posts: 22 Location: UNITED KINGDOM
|
|
|
|
actually redefine itself means that same storage allocation as that of the predefined variable.so in the system there is no certain systematic system to storing the values of redefines variable
i hope i made u clear.any more query is welcome.. |
|
Back to top |
|
|
Vinodc
New User
Joined: 01 Dec 2005 Posts: 33 Location: Prague
|
|
|
|
Hi,
Redefines means giving another name to same storage location. Conceptually similar to system where I am called Mr. Chawda in office and Vinoo by friends.
Cheers!! |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi,
Well, I'm clear about that!! But Will it overwrite on the same storage area inorder to store the space or Will it use seperate storage area to keep the variable value? I'm bit confused about how it keeps the data in system.
Thanks in advance. |
|
Back to top |
|
|
vikasc4
New User
Joined: 11 Dec 2005 Posts: 32
|
|
|
|
Hi Niceguy,
There is no overwrite as such, both the field will contain the same thing in them at a time. For example if A and B are two variable and if B REDEFINE A is given . And if there is a statement in program like.....
MOVE 'VIKAS' TO A.
then both A and B will contain VIKAS only.
Thus now moving Something else in any of A and B will change the contain of that memory Area from VIKAS to some new thing, depending on what is Moved in these fields.
regards
Vikas |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi,
Thanks for ur reply. .
Thank u |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi,
Thanks for ur reply. .
Thank u |
|
Back to top |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hi Vikas
I have a doubt about your example...
If B is defined as some other data type (eg numeric type),
Now you are moving "vikas" to A then wat the value can B be stored ? |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Rajesh,
A and B will still contain "VIKAS", but you now have a program abend (actually an 0C7 pgm interrupt) waiting to happen when an arith op is attempted using B. |
|
Back to top |
|
|
rajesh_mbt
New User
Joined: 27 Mar 2006 Posts: 97 Location: India
|
|
|
|
Hi MMwife
Thanks for your reply. |
|
Back to top |
|
|
|