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

DICT ... AREA.CODE
    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.


Wols,

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

cds

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

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] 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.

Cheers,
Wol


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to