Re: [Oorexx-devel] Question ad parsing

2022-06-08 Thread Rony G. Flatscher

On 6/8/2022 4:58 PM, Rick McGuire wrote:
The triggers get applied first, then things get broken in words using the variable list. TheĀ +2 
trigger matches to the second position, "c ", which is then broken into words and assigned to the 
variables.


I see, thank you!

---rony



On Wed, Jun 8, 2022 at 10:51 AM Rony G. Flatscher  
wrote:

Consider the following:

parse value "c fgh" with v1 v2
   ... rexxtry.rex on WindowsNT
say "v1=["v1"] v2=["v2"]"
v1=[c] v2=[fgh]
   ... rexxtry.rex on WindowsNT

parse value "c fgh" with v1 v2 +2
   ... rexxtry.rex on WindowsNT
say "v1=["v1"] v2=["v2"]"
v1=[c] v2=[]
   ... rexxtry.rex on WindowsNT

Why would v2 in the second parse refer to an empty string (would have expected the 
string "fg")?

---rony

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad parsing

2022-06-08 Thread Rick McGuire
The triggers get applied first, then things get broken in words using the
variable list. The +2 trigger matches to the second position, "c ", which
is then broken into words and assigned to the variables.

Rick

On Wed, Jun 8, 2022 at 10:51 AM Rony G. Flatscher 
wrote:

> Consider the following:
>
> parse value "c fgh" with v1 v2
>   ... rexxtry.rex on WindowsNT
> say "v1=["v1"] v2=["v2"]"
> v1=[c] v2=[fgh]
>   ... rexxtry.rex on WindowsNT
>
> parse value "c fgh" with v1 v2 +2
>   ... rexxtry.rex on WindowsNT
> say "v1=["v1"] v2=["v2"]"
> v1=[c] v2=[]
>   ... rexxtry.rex on WindowsNT
>
> Why would v2 in the second parse refer to an empty string (would have
> expected the string "fg")?
>
> ---rony
>
>
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Question ad parsing

2022-06-08 Thread Rony G. Flatscher

Consider the following:

   parse value "c fgh" with v1 v2
  ... rexxtry.rex on WindowsNT
   say "v1=["v1"] v2=["v2"]"
   v1=[c] v2=[fgh]
  ... rexxtry.rex on WindowsNT

   parse value "c fgh" with v1 v2 +2
  ... rexxtry.rex on WindowsNT
   say "v1=["v1"] v2=["v2"]"
   v1=[c] v2=[]
  ... rexxtry.rex on WindowsNT

Why would v2 in the second parse refer to an empty string (would have expected the string 
"fg")?

---rony

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel