xrange problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xrange problem

Richard Schoepf
When I include 'say' in line to display what xrange is generating, I get the translation to upper case - not what I want.  When I use 'say' in trace mode I get both upper case and lower case as I would expect. Example of the code follows:
/* */
  signal on syntax

do forever
       say 'Enter 8 character string'
       parse pull cst dbg

/* check blank entry and set default */
       if length(cst) <> 8 then do
         say 'length not 8 characters.'
         'pause'
          leave
          end

       say xrange(A,Z)       /* results are as expected */
       say xrange(a,z)        /* Results switched to upper case */

 'pause'

end

 'pause'
 trace ?r; nop        /* same instructions yield upper/lower case */
 exit

 Syntax:
  say 'syntax error' rc 'in line' sigl':'  "ERRORTEXT"(rc)
  say rp
  say "SOURCELINE"(sigl)
  trace ?r; nop
  'pause'
  exit
Reply | Threaded
Open this post in threaded view
|

Re: xrange problem

LesK
Administrator
Use quotes in the args to get the result you want:

say xrange('a','z')

Les

On 12/27/2016 1:05 AM, Richard Schoepf  [via Rexx Language Association
Forum] wrote:

>
>
> When I include 'say' in line to display what xrange is generating, I get the
> translation to upper case - not what I want.  When I use 'say' in trace mode
> I get both upper case and lower case as I would expect. Example of the code
> follows:
> /* */
>   signal on syntax
>
> do forever
>        say 'Enter 8 character string'
>        parse pull cst dbg
>
> /* check blank entry and set default */
>        if length(cst) <> 8 then do
>          say 'length not 8 characters.'
>          'pause'
>           leave
>           end
>
>        say xrange(A,Z)       /* results are as expected */
>        say xrange(a,z)        /* Results switched to upper case */
>
>  'pause'
>
> end
>
>  'pause'
>  trace ?r; nop        /* same instructions yield upper/lower case */
>  exit
>
>  Syntax:
>   say 'syntax error' rc 'in line' sigl':'  "ERRORTEXT"(rc)
>   say rp
>   say "SOURCELINE"(sigl)
>   trace ?r; nop
>   'pause'
>   exit
>
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://rexx-language-association-forum.44760.x6.nabble.com/xrange-problem-tp3675.html
> To start a new topic under Rexx Language Association Forum, email [hidden email]
> To unsubscribe from Rexx Language Association Forum, visit