The requirement is for up to 1000 or so arrays which are used only within the subroutine. If they are assigned upon entry each variable has to have memory setup and the values have be contatenated and stored in the variables. I could put them in named common and only initialize them once but still the overhead exists for the one-time initialization. If the values are EQUates the concatenation is accomplished at compile time and the only overhead is the object code load when the subroutine is called.
Am I making sense? Perry -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MAJ Programming Sent: Saturday, October 11, 2008 12:12 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2][UV] EQUATEs Using System Delmiiters I too was going to ask "why not a regular variable"? What does that mean, "overhead of setting up the variables". Is this item passed thru the subroutine either directly or indirectly or is it equated in both the sub and the calling program. Thanks in advance for the explanation. Mark Johnson ----- Original Message ----- From: "Perry Taylor" <[EMAIL PROTECTED]> To: <u2-users@listserver.u2ug.org> Sent: Monday, October 06, 2008 10:27 PM Subject: RE: [U2][UV] EQUATEs Using System Delmiiters > The parentheses do the trick! Thanks to everyone. > > BTW... The reason I don't want to use variables is this is going in a > subroutine and I don't want the overhead of setting up the variables > when it is called. > > Thanks again! > > Perry > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Womack, Adrian > Sent: Monday, October 06, 2008 6:45 PM > To: u2-users@listserver.u2ug.org > Subject: RE: [U2][UV] EQUATEs Using System Delmiiters > > Try putting parentheses around the expression: > > eg. EQU MX TO ('ABCD':@AM:'EFGH') > > That will cause each of the functions to operate on the whole string > rather than on a single element of the string. > > Although something strange is obviously going wrong. I would have > expected the operations to affect just the last portion ("EFGH") but it > seems to be affecting the first portion. > > Why use EQUATE anyway in this case, you'd be better of just assigning a > variable. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor > Sent: Tuesday, 7 October 2008 4:06 AM > To: U2-Users List > Subject: [U2][UV] EQUATEs Using System Delmiiters > > I'm trying to use EQUates to setup static arrays in a BASIC program but > am getting strange results. The UniVerse BASIC manual says you can use > any valid BASIC expression as an object to the symbol. However when I > try to create an array with... > > EQU MX TO 'ABCD': @AM: 'EFGH' > > ... I get strange results. Consider the following code... > > ---------------------------------------------------------- > EQU MX TO 'ABCD': @AM: 'EFGH' > > CRT > CRT 'MX=': MX > > LC = LEN(MX) > > CRT > CRT 'LEN(MX)=': LC > CRT > > FOR NC = 1 TO LC > > CRT 'SEQ(MX[': NC: ', 1])=':SEQ(MX[NC, 1]) > > NEXT NC > > CRT > > LAMC = DCOUNT(MX, @AM) > > CRT > CRT 'DCOUNT(MX, @AM)=': LAMC > CRT > > FOR AMC = 1 TO LAMC > > CRT 'MX<': AMC: '>=': MX<AMC> > > NEXT AMC > ---------------------------------------------------------- > > When I run this code in a Pick-flavored account I get the following > results... > > ---------------------------------------------------------- > > MX=ABCD~EFGH > > LEN(MX)=9 > > SEQ(MX[1, 1])=65 > SEQ(MX[2, 1])=65 > SEQ(MX[3, 1])=65 > SEQ(MX[4, 1])=65 > SEQ(MX[5, 1])=65 > SEQ(MX[6, 1])=65 > SEQ(MX[7, 1])=65 > SEQ(MX[8, 1])=65 > SEQ(MX[9, 1])=65 > > > DCOUNT(MX, @AM)=2 > > MX<1>=ABCD~EFGH > MX<2>=ABCD~ > > ---------------------------------------------------------- > > What am I missing here? > > Thanks. > > Perry Taylor > Zirmed, Inc. > UniVerse 10.1.21/RHEL3 > > > > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, > is for the sole use of the intended recipient(s) and may contain > confidential and privileged information. Any unauthorized review, use, > disclosure or distribution is prohibited. ZirMed, Inc. has strict > policies regarding the content of e-mail communications, specifically > Protected Health Information, any communications containing such > material will be returned to the originating party with such advisement > noted. If you are not the intended recipient, please contact the sender > by reply e-mail and destroy all copies of the original message. > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > > > DISCLAIMER: > Disclaimer. This e-mail is private and confidential. If you are not the > intended recipient, please advise us by return e-mail immediately, and > delete the e-mail and any attachments without using or disclosing the > contents in any way. The views expressed in this e-mail are those of the > author, and do not represent those of this company unless this is > clearly indicated. You should scan this e-mail and any attachments for > viruses. This company accepts no liability for any direct or indirect > damage or loss resulting from the use of any attachments to this e-mail. > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/