Re: [Hardhats-members] Traversing an array

2006-07-12 Thread Kevin Toppenberg
Very nice!.  That $query is the function I was looking for.  I read
about it on the Mumps by example web site, but couldn't understand
what I was reading

thanks!
Kevin



On 7/12/06, Maury Pepper <[EMAIL PROTECTED]> wrote:
> Kevin,
>
> here's a simple loop to create array B from array A with the following rules:
> For each data node in A, create a node in B having a subscript which is the 
> last subscript of the A node, and set the value of the B node equal to the 
> first subscript of the A node.
>
> SET N="A"
> FOR  SET N=$Q(@N) Q:N=""  SET B($QS(N,$QL(N)))=$QS(N,1)
>
>
> - Original Message -
> From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, July 11, 2006 4:36 PM
> Subject: Re: [Hardhats-members] Traversing an array
>
>
> >I was afraid you were going to say that... :-)
> > Kevin
> >
> >
> > On 7/11/06, Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> >> Try using $QS and $QL.
> >>
> >> --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> >>
> >> > I need to work on an array something like this.
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
>


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] Traversing an array

2006-07-12 Thread Gregory Woodhouse
On Jul 11, 2006, at 11:22 PM, Maury Pepper wrote:here's a simple loop to create array B from array A with the following rules: For each data node in A, create a node in B having a subscript which is the last subscript of the A node, and set the value of the B node equal to the first subscript of the A node.  SET N="A" FOR  SET N=$Q(@N) Q:N=""  SET B($QS(N,$QL(N)))=$QS(N,1)  Aaah...You let the cat out of the bag!   :-) Gregory Woodhouse[EMAIL PROTECTED]"The most incomprehensible thing about the world is that it is at all comprehensible." --Albert Einstein (1879-1955) 
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] Traversing an array

2006-07-11 Thread Maury Pepper
Kevin,

here's a simple loop to create array B from array A with the following rules:
For each data node in A, create a node in B having a subscript which is the 
last subscript of the A node, and set the value of the B node equal to the 
first subscript of the A node.

SET N="A"
FOR  SET N=$Q(@N) Q:N=""  SET B($QS(N,$QL(N)))=$QS(N,1)


- Original Message - 
From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, July 11, 2006 4:36 PM
Subject: Re: [Hardhats-members] Traversing an array


>I was afraid you were going to say that... :-)
> Kevin
> 
> 
> On 7/11/06, Greg Woodhouse <[EMAIL PROTECTED]> wrote:
>> Try using $QS and $QL.
>>
>> --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
>>
>> > I need to work on an array something like this.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] Traversing an array

2006-07-11 Thread Greg Woodhouse
Well, you don't HAVE to use them, repeatedly S X=$O(X,"") until you run
out of subscripts. But using $QL is a whole lot easier, and $QS allows
you to pull out the subscript.

--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> I was afraid you were going to say that... :-)
> Kevin
> 
> 
> On 7/11/06, Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> > Try using $QS and $QL.
> >
> > --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
> >
> > > I need to work on an array something like this.
> > >
> 
> 
>
-
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 


===
Gregory Woodhouse  <[EMAIL PROTECTED]>

"Judge a man by his questions not his answers."
--Voltaire


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] Traversing an array

2006-07-11 Thread Kevin Toppenberg
I was afraid you were going to say that... :-)
Kevin


On 7/11/06, Greg Woodhouse <[EMAIL PROTECTED]> wrote:
> Try using $QS and $QL.
>
> --- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:
>
> > I need to work on an array something like this.
> >


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members


Re: [Hardhats-members] Traversing an array

2006-07-11 Thread Greg Woodhouse
Try using $QS and $QL.

--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> I need to work on an array something like this.
> 
> A(i1,i2a,i3)="dog"
> A(i1,i2b,)="cat"
> A(i1,i2b,i3a)="ape"
> A(i2,i2b,i3b)="lion"
> A(i2,i2c,i3)="seal"
> A(i2,i2c,i3,i4,i5)="mouse"
> 
> I am wanting to reorder the array such that the highest index (i5
> etc)
> is the primary index of the final array, and the first index is the
> value.  e.g.
> 
> B(i3)=a1
> B(i2b)=a1
> B(i3a)=i1
> B(i3b)=i2
> B(i3)=i2
> B(i5)=i2
> 
> So what I want is a way to get each separate line item of the list
> from the first example.  I think there is a function to do this, but
> I
> can't find it.
> 
> Can anyone help?
> 
> Kevin
> 
> 
>
-
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 


===
Gregory Woodhouse  <[EMAIL PROTECTED]>

"Judge a man by his questions not his answers."
--Voltaire


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members