View previous topic :: View next topic
|
Author |
Message |
G.S.Sekhar
New User
Joined: 19 Aug 2005 Posts: 5
|
|
|
|
Hi,
If anyone give explanation and example for LOW & HIGH functions in PL/1. It's so greatful to me. Thanks in advance. |
|
Back to top |
|
|
Athanga
New User
Joined: 29 Sep 2005 Posts: 9
|
|
|
|
HI...
check this ..
let a variable be ABC and you want to initialize with low values or high values then use
ABC = LOW(CSTG(ABC))
ABC = HIGH(CSTG(ABC))
here CSTG menas current storage area of that variable will be taken or you can hard code to how many bytes of that variable need to be initialized.
ie
ABC = LOW(10)
ABC = HIGH(10)
I am not 100% sure.. |
|
Back to top |
|
|
Sridevi_C
Active User
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
|
|
|
|
Hi Sekhar,
LOW and HIGH buitin functions return character that is the lowest and highest respectively of the collating sequence.The returned character is repeated depending upon the length specified.
Example:
NAME = LOW(25);
Say,NAME is declared as CHAR(25) and the lowest value of the collating sequence is BLANK.Now the above statement moves 25 blanks to NAME,ie. NAME is initialized to spaces.
My explanation resembles Athanga's.I am very sure about what I spoke, but I couldn't speak in terms of CSTG.
Hope this helps...
Thanks!
Sridevi. |
|
Back to top |
|
|
|