View previous topic :: View next topic
|
Author |
Message |
nkothako
Active User
Joined: 26 Nov 2008 Posts: 125 Location: chennai
|
|
|
|
unble move & print the wild cards in the varialbe
Code: |
ex : IF JH = ' ' THEN JH = '%%.'
say JH |
output is printing as : JH only but why its not printing %%.
is it possible to move wild cards into varialbe |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
post a more meaningful snippet and You might get more explanations
even if Your sample does not make sense,
the analysis for the two lines posted is...
the JH variable is not initialized,
it will not match the comparison with one blank
it will not be set to the new value
the display of an un-initialized variable will just display its name
analysis confirmed by testing
WRONG code
Code: |
/* rexx */
Trace "O"
if JH = ' ' then JH = '%%.'
say JH
exit |
formally correct code ( VARIABLES INITIALIZED)
Code: |
/* rexx */
Trace "O"
JH = ' '
if JH = ' ' then JH = '%%.'
say JH
exit |
|
|
Back to top |
|
|
|