Here is an example.
Suppose US phone numbers stored as
         123-456-7890   (area code 123)
or     123-4567           (area code 'unk'nown)

    01: I
    02: PHONE; COUNT( @, '-' ); IF @ > 1 THEN @1[ '-', 1, 1] ELSE 'unk'
same as
    02: PHONE; COUNT( @1, '-' );  IF @2 > 1 THEN @1[ '-',1,1] ELSE 'unk'

Not the best algorithm, but it illustrates.


You gotta give an example, of a nested I-descriptor successfully referencing another with multiple ";"-separated expressions.


On 9/15/2011 11:18 AM, Woodward, Bob wrote:
Wait a minute... How do you point to the previous expression?  @<-1>????

-----Original Message-----
[] On Behalf Of Wols Lists
Sent: Thursday, September 15, 2011 9:05 AM
To: U2 Users List
Subject: Re: [U2] I-type Subvalue question

On 15/09/11 14:38, Charles Stevenson wrote:
Allows you to reference this I-descriptor from another I-descriptor
    in the future.
    UV doesn't let you do that if there are multiple expressions
    separated by semi-colons.
    There is no good reason for that restriction other than internal,
    how it was implemented.
I think Prime might have had the same restriction. But it's because UV
doesn't reference one I-descriptor from another, it expands it and all
the @s end up pointing to the wrong place. Actually, so if your @ merely
points at the previous expression, it should work. It's as soon as you
use @1 @2 etc that it'll blow up.


U2-Users mailing list

Reply via email to