RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-13 Thread Boydell, Stuart
This makes very good sense to use EQU TO and EQU LIT.
The technique is considered pretty standard in other languages which
have specific constant & macro constructs.  There are also very good
semantic and source quality imperatives to use this type of technique. 
Cheers,
Stuart Boydell

>-Original Message-
>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?

 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2][UV] EQUATEs Using System Delmiiters

2008-10-12 Thread Ross Morrissey
If you can live with value marks instead of attribute marks, why not try
something like:
EQU AB TO "A]B"   (i.e.  EQU AB TO "A^253B")
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2][UV] EQUATEs Using System Delmiiters

2008-10-12 Thread MAJ Programming
Whether you make sense to us is secondary. Basically, questions like this
just offer another perspective and second view of a not-normal situation and
to cover all the bases.

WE don't have to understand. We're just offering second opinions that may
solve or validate your opinions/conclusions.

Mark Johnson
- Original Message -
From: "Perry Taylor" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, October 11, 2008 11:46 PM
Subject: RE: [U2][UV] EQUATEs Using System Delmiiters


> 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: 
> 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
> >
> >   NEXT AMC
> > --
> >
> > When I run this code in a Pick-flavored account I get the foll

RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-11 Thread Perry Taylor
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: 
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
>
>   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

Re: [U2][UV] EQUATEs Using System Delmiiters

2008-10-11 Thread MAJ Programming
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: 
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
>
>   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/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-08 Thread Ray Wurlod
I'd like to take issue with that, Brian.  As far as I am aware what you say is 
right for a LIT equate, but not for a TO equate.

With a TO equate the compiler evaluates the expression, so that the literal 
string (in the current example) "ABCD~EFGH" would be what was substituted 
throughout the code.

With a LIT equate the expression itself is substituted.

Please correct me if I'd got that wrong - I'm not anywhere with access to VLIST 
at the moment.

Regards,
Ray

> - Original Message -
> From: "Brian Leach" <[EMAIL PROTECTED]>
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2][UV] EQUATEs Using System Delmiiters
> Date: Wed, 8 Oct 2008 09:59:13 +0100
> 
> 
> Perry
> 
> Actually you're going to feel the pain more..
> 
> Remember that an equate is nothing more than a literal substitution by the
> compiler. Every instance of MX will be replaced by 'ABCD':@AM:'EFGH'. So
> everywhere you access 'MX' you will also be performing the operation
> ('ABCD':@AM:'EFGH'). That's a higher overhead than setting up a variable e.g
> MX = 'ABCD':@AM:'EFGH' and using that.
> 
> There are plenty good reasons for using EQUates, but that's not one of them.
> 
> Regards
> 
> Brian
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-08 Thread Brian Leach
Martin/Perry

Thanks, nice to learn it's smarter than I thought :)

Brian 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Martin Phillips
> Sent: 08 October 2008 14:50
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2][UV] EQUATEs Using System Delmiiters
> 
> Hi Perry,
> 
> Yes, you are right. The UV compiler is intelligent enough to 
> pre-evaluate literal concatenations at compile time.
> 
> 
> Martin Phillips
> Ladybridge Systems Ltd
> 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
> +44-(0)1604-709200 
> ---
> 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/


Re: [U2][UV] EQUATEs Using System Delmiiters

2008-10-08 Thread Martin Phillips

Hi Perry,

Yes, you are right. The UV compiler is intelligent enough to pre-evaluate 
literal concatenations at compile time.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
---

u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-08 Thread Perry Taylor
Unless I'm off on my interpretation of VLIST's output I think the 
concantenation has already taken place at compile time.  If you look at line 
#11 below it appears to me that a literal 'ABCD^EFGH' is being assigned to X.  
I suspect that this is due to MX consisting of all literal values, no variable 
references.  Am I off base with my conclusions?

Perry

[EMAIL PROTECTED]:TRAX >VLIST PBP EQU.TEST
Main Program "PBP.O/EQU.TEST"
Compiler Version: 10.1.0.0
Object Level: 5
Machine Type: 1
Local Variables : 1
Subroutine args : 0
Unnamed Common  : 0
Named Common Seg: 0
Object Size : 8
Source lines: 13
Object Date Time: 08 OCT 2008 08:13:16

1: PROGRAM EQU.TEST

2: !

3: * TEST EQU WITH ARRAYS

4: *

5: * 10/02/2008

6: * PERRY TAYLOR

7: !

8:

9:   EQU MX TO ('ABCD': @AM: 'EFGH')

00010:

00011:   X = MX
00011 0 : 0F8 move   "ABCD~EFGH"  => X

00012:

00013:
00014 6 : 190 stop 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Leach
Sent: Wednesday, October 08, 2008 2:59 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2][UV] EQUATEs Using System Delmiiters

Perry

Actually you're going to feel the pain more.. 

Remember that an equate is nothing more than a literal substitution by the
compiler. Every instance of MX will be replaced by 'ABCD':@AM:'EFGH'. So
everywhere you access 'MX' you will also be performing the operation
('ABCD':@AM:'EFGH'). That's a higher overhead than setting up a variable e.g
MX = 'ABCD':@AM:'EFGH' and using that.

There are plenty good reasons for using EQUates, but that's not one of them.

Regards

Brian

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor
> Sent: 07 October 2008 03:27
> To: u2-users@listserver.u2ug.org
> 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
> 
>   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])=6

RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-08 Thread Brian Leach
Perry

Actually you're going to feel the pain more.. 

Remember that an equate is nothing more than a literal substitution by the
compiler. Every instance of MX will be replaced by 'ABCD':@AM:'EFGH'. So
everywhere you access 'MX' you will also be performing the operation
('ABCD':@AM:'EFGH'). That's a higher overhead than setting up a variable e.g
MX = 'ABCD':@AM:'EFGH' and using that.

There are plenty good reasons for using EQUates, but that's not one of them.

Regards

Brian

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor
> Sent: 07 October 2008 03:27
> To: u2-users@listserver.u2ug.org
> 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
> 
>   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-

RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-06 Thread Perry Taylor
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

  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/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-06 Thread Womack, Adrian
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

  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/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-06 Thread Hona, David S
It's poorly documented (likely many other things!), but use the
following syntax:

EQU MX LIT "'ABCD': @AM: 'EFGH'"

Regards,
David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perry Taylor
Sent: Tuesday, 7 October 2008 7: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...


What am I missing here?

Thanks.

Perry Taylor
Zirmed, Inc.
UniVerse 10.1.21/RHEL3
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2][UV] EQUATEs Using System Delmiiters

2008-10-06 Thread Boydell, Stuart
What happens is the compiler doesn't know that you're expecting MX to
behave as a type of macro so it evaluates the equate as
SEQ('ABCD':@AM:'EFGH'[NC,1])

Should fix it if you try:
 EQU MX TO ('ABCD': @AM: 'EFGH')


>-Original Message-
[snipped]
>... I get strange results.  Consider the following code...
>   EQU MX TO 'ABCD': @AM: 'EFGH'
> CRT 'SEQ(MX[': NC: ', 1])=':SEQ(MX[NC, 1])
>SEQ(MX[9, 1])=65

 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/