RE: Optimisation ?

2004-03-26 Thread Morelli, David
Ken,

It may be the use of language.  Your last sentence lost something
important, the words "non-stop".  "I think most non-yanks would have
known that Alcock and Brown's was the first <> crossing of the
Atlantic by air."

Alcock and Brown flew by air from Newfoundland to Ireland for the Daily
Mail Prize in June,1919.  Earlier, in May of that year, one of four
American planes made the first successful crossing of the Atlantic by
air from Newfoundland to Plymouth,England, by way of the Azores and
Portugal.  Alcock and Brown flew non-stop 50% longer than the longest
leg flown by the Americans.

Lindberg was the first solo flight, it also was over 50% longer than the
route of Alcock and Brown.  His route was dictated by the terms of the
Raymond Orteig Prize, which specified the longer New York to Paris
route.

David Morelli


On Behalf Of Ken Wallis
Subject: RE: Optimisation ?

...
Did you know...?  Charles Lindbergh was not the first man to fly nonstop
across the Atlantic Ocean.  Two men had achieved the same goal eight
years earlier!   Flying for sixteen and a half hours from June 14-15,
1919, Captain John Alcock and Lieutenant Arthur Whitten-Brown had
copiloted a Vichers-Vimy twin-engine plane nonstop from Newfoundland
across the Atlantic to Ireland.  Lindbergh was just the first person to
do it alone.

She could just as easily have said "Lindbergh was just the first
American to do it".  I think most non-yanks would have known that Alcock
and Brown's was the first crossing of the Atlantic by air.

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: [OT] Airplane flights and stuff was Re: Optimisation ?

2004-03-26 Thread John Jenkins
A Welshman flew a 'plane in the reign of the emperor Tiberius - you can see
the evidence yourself - there's a coin with a primitive 'plane on it and the
date on the coin says (in Roman numerals naturally) "TIBERIVS IMPERATOR" and
on the obverse "LXVI B.C."

Regards

JayJAy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 26 March 2004 18:12
To: U2 Users Discussion List
Subject: [OT] Airplane flights and stuff was Re: Optimisation ?

The Russians flew an aircraft in 1857!

No no the Japanese had one flying in 1831!

So? The Chinese flew one in 731

In a message dated 3/26/2004 9:10:14 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:

> I knew this!!!  I believe there was also a New Zealander, Richard 
> Pearce, who is eye witnessed to have flown in March 1903.  Check out:
> http://www.nzedge.com/heroes/pearse.html
> 
> At 03:02 AM 03/26/2004, you wrote:
> >Did you know the Americans weren't even the first to build a 
> >successful aeroplane?
> >
> >The first aircraft built that flew successfully (note my strange word 
> >order :-) was built in 1896, in England.
> >
> >Unfortunately, it had to be rebuilt, and the first
> successful flight was
> >(iirc) 1912.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


[OT] Airplane flights and stuff was Re: Optimisation ?

2004-03-26 Thread FFT2001
The Russians flew an aircraft in 1857!

No no the Japanese had one flying in 1831!

So? The Chinese flew one in 731

In a message dated 3/26/2004 9:10:14 AM Eastern Standard Time, [EMAIL PROTECTED] 
writes:

> I knew this!!!  I believe there was also a New Zealander, Richard Pearce, 
> who is eye witnessed to have flown in March 1903.  Check out: 
> http://www.nzedge.com/heroes/pearse.html
> 
> At 03:02 AM 03/26/2004, you wrote:
> >Did you know the Americans weren't even the first to build a successful
> >aeroplane?
> >
> >The first aircraft built that flew successfully (note my strange word
> >order :-) was built in 1896, in England.
> >
> >Unfortunately, it had to be rebuilt, and the first 
> successful flight was
> >(iirc) 1912.
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-26 Thread Glenn Herbert
I knew this!!!  I believe there was also a New Zealander, Richard Pearce, 
who is eye witnessed to have flown in March 1903.  Check out: 
http://www.nzedge.com/heroes/pearse.html

At 03:02 AM 03/26/2004, you wrote:
Did you know the Americans weren't even the first to build a successful
aeroplane?
The first aircraft built that flew successfully (note my strange word
order :-) was built in 1896, in England.
Unfortunately, it had to be rebuilt, and the first successful flight was
(iirc) 1912.
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Optimisation ?

2004-03-26 Thread Jonathan Leckie
LOL, thank you gentlemen you are all scholars, because of your sage advice I
have cut my estimated time to do a clear down from an estimated 45 days (of
8 hours) to 4 hours.

The version of Unidata I use assumes the "R" option if no third parameter is
given to the TRIM function.

- Original Message - 
From: "Jonathan Leckie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 25, 2004 12:29 PM
Subject: Optimisation ?


> I have the following piece of code :
>
> IF REC<1> £ '' THEN
>   MAX=DCOUNT(REC<1>,VM)
>   FOR LOP=1 TO MAX
> IF REC<1,LOP> = '' THEN
>   REC=DELETE(REC,1,LOP,0)
>   IF LOP = MAX THEN GO 300
>   LOP=LOP-1
> END
>   NEXT LOP
> END
>
> I wonder could this simply be replaced with :
>
> IF REC<1> £ '' THEN
>   REC<1>=TRIM(REC<1>,@VM)
>   GO 300
> END
>
> Can anyone see any problems with using TRIM to remove trailing, repeated
and
> initial value markers and therefore achieving the same effect without
> looping through each multi-value?  This is on Unidata 3.3.2 incidentally.
>



-- 


* This message has been scanned for viruses and dangerous content by  
* Blairs of Scotland MailScanner, and is believed to be clean.
*   
* This email and any files transmitted with it are confidential and 
* intended solely for the use of the individual or entity to which they
* are addressed.
*
* If you have received this email in error please notify us at Blairs
* of Scotland via email at [EMAIL PROTECTED]


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-26 Thread Anthony Youngman
Did you know the Americans weren't even the first to build a successful
aeroplane?

The first aircraft built that flew successfully (note my strange word
order :-) was built in 1896, in England.

Unfortunately, it had to be rebuilt, and the first successful flight was
(iirc) 1912.

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ken Wallis
Sent: 26 March 2004 01:17
To: 'U2 Users Discussion List'
Subject: RE: Optimisation ?

PS.  Why do you think the Americans on this list felt the need to change
the
spelling of "Optimisation" from the original English (Scots?).  The rest
of
us put up with enough "centers" and "realizes" from you yanks!

Did anyone else get the monthly jBASE "Did you know?" email from Kerri
Duffy?  In it she says:

Did you know...?  Charles Lindbergh was not the first man to fly nonstop
across the Atlantic Ocean.  Two men had achieved the same goal eight
years
earlier!   Flying for sixteen and a half hours from June 14-15, 1919,
Captain John Alcock and Lieutenant Arthur Whitten-Brown had copiloted a
Vichers-Vimy twin-engine plane nonstop from Newfoundland across the
Atlantic
to Ireland.  Lindbergh was just the first person to do it alone.

She could just as easily have said "Lindbergh was just the first
American to
do it".  I think most non-yanks would have known that Alcock and Brown's
was
the first crossing of the Atlantic by air.






-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




***

This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-25 Thread Ken Wallis
>> -Original Message-
>> Behalf Of Jonathan Leckie

>> I have the following piece of code :
>>
>> IF REC<1> £ '' THEN
>>   MAX=DCOUNT(REC<1>,VM)
>>   FOR LOP=1 TO MAX
>> IF REC<1,LOP> = '' THEN
>>   REC=DELETE(REC,1,LOP,0)
>>   IF LOP = MAX THEN GO 300
>>   LOP=LOP-1
>> END
>>   NEXT LOP
>> END

I'm just going to say this: Any code that messes with the loop variable from
a FOR loop is asking for trouble.
Pick and Prime type environments used to do their incrementing differently -
ie pre/post test.  If you want to loop a variable number of times and you
feel the need to use the loop counter then take ownership of it yourself and
use a LOOP ... WHILE ... REPEAT construct.

In this simple scenario, TRIM() is obviously better, faster, etc, but if
perhaps you had to delete other associated multivalues from other attributes
based on the value in REC<1>, or if you wanted to delete all the values
which were "TBD" lets say, instead of "", then you'd need a loop construct.

Generally, when processing dynamic arrays field by field, or attribute by
attribute it is best to work backwards as Wol suggests, but IMHO if you need
to go forward through a loop anything but a fixed number of times, you
should use LOOP ... REPEAT.

eg:

* delete the first three occurrences of "TBD" in REC<98>
* and the associated values from REC<47>, REC<99> and REC<33>
DIM WORK_ARR(4,2)
MAT WORK_ARR = ""
WORK_ARR(1,1) = 98
WORK_ARR(2,1) = 99
WORK_ARR(3,1) = 47
WORK_ARR(4,1) = 33
FOR ATT = 1 TO 4
WORK_ARR(I,2) = REC
NEXT ATT
LOOP_LIM = DCOUNT(WORK_ARR(1,2), @VM)
BITS_DELETED = 0
LOOP_IDX = 1
LOOP
CURR_BIT = WORK_ARR(1,2)<1,LOOP_IDX>
IF CURR_BIT = "TBD" THEN
FOR ATT = 1 TO 4
WORK_ARR(ATT,2) = DELETE(WORK_ARR(ATT,2), 1, LOOP_IDX, 0)
NEXT ATT
LOOP_LIM -= 1
LOOP_IDX -= 1
BITS_DELETED += 1
END
WHILE LOOP_IDX < LOOP_LIM AND BITS_DELETED < 3
LOOP_IDX += 1
REPEAT
FOR ATT = 1 TO 4
REC = WORK_ARR(ATT,2)
NEXT ATT
*
* don't reference ATT here since I'm outside the FOR ... NEXT,
* but OK to reference LOOP_IDX because it belongs to me!
*
CRT BITS_DELETED:" values were deleted, ":LOOP_IDX:" out of ":LOOP_LIM:"
values were tested"

Cheers,

Ken



PS.  Why do you think the Americans on this list felt the need to change the
spelling of "Optimisation" from the original English (Scots?).  The rest of
us put up with enough "centers" and "realizes" from you yanks!

Did anyone else get the monthly jBASE "Did you know?" email from Kerri
Duffy?  In it she says:

Did you know…?  Charles Lindbergh was not the first man to fly nonstop
across the Atlantic Ocean.  Two men had achieved the same goal eight years
earlier!   Flying for sixteen and a half hours from June 14-15, 1919,
Captain John Alcock and Lieutenant Arthur Whitten-Brown had copiloted a
Vichers-Vimy twin-engine plane nonstop from Newfoundland across the Atlantic
to Ireland.  Lindbergh was just the first person to do it alone.

She could just as easily have said "Lindbergh was just the first American to
do it".  I think most non-yanks would have known that Alcock and Brown's was
the first crossing of the Atlantic by air.






-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-25 Thread Bill H.
Jonathan:

Despite the digression about your code, I think the TRIM() function should
work just fine.

On D3, however, no matter how many leading or trailing @VMs exist, a single
@VM remains at the beginning and/or end of the string.  This is true even
with Glenn's suggestion, TRIM(REC<1>, @VM, "R").

This works fine on U2, but if you need to port to D3 you'd need to revert to
a modified version of the code you included below.

Hope this helps.

Bill

> -Original Message-
> Behalf Of Jonathan Leckie
> Sent: Thursday, March 25, 2004 4:29 AM
> To: [EMAIL PROTECTED]
> Subject: Optimisation ?
>
>
> I have the following piece of code :
>
> IF REC<1> £ '' THEN
>   MAX=DCOUNT(REC<1>,VM)
>   FOR LOP=1 TO MAX
> IF REC<1,LOP> = '' THEN
>   REC=DELETE(REC,1,LOP,0)
>   IF LOP = MAX THEN GO 300
>   LOP=LOP-1
> END
>   NEXT LOP
> END
>
> I wonder could this simply be replaced with :
>
> IF REC<1> £ '' THEN
>   REC<1>=TRIM(REC<1>,@VM)
>   GO 300
> END
>
> Can anyone see any problems with using TRIM to remove trailing,
> repeated and
> initial value markers and therefore achieving the same effect without
> looping through each multi-value?  This is on Unidata 3.3.2
> incidentally.

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-25 Thread Marco Antonio Rojas Castro
Hi,

try this

IF REC<1> £ '' THEN
  REC<1> = TRIM(REC<1>, @VM, 'R')
  GO 300
END
Cheers, Marco


From: "Jonathan Leckie" <[EMAIL PROTECTED]>
Reply-To: U2 Users Discussion List <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Optimisation ?
Date: Thu, 25 Mar 2004 12:29:02 -
I have the following piece of code :

IF REC<1> £ '' THEN
  MAX=DCOUNT(REC<1>,VM)
  FOR LOP=1 TO MAX
IF REC<1,LOP> = '' THEN
  REC=DELETE(REC,1,LOP,0)
  IF LOP = MAX THEN GO 300
  LOP=LOP-1
END
  NEXT LOP
END
I wonder could this simply be replaced with :

IF REC<1> £ '' THEN
  REC<1>=TRIM(REC<1>,@VM)
  GO 300
END
Can anyone see any problems with using TRIM to remove trailing, repeated 
and
initial value markers and therefore achieving the same effect without
looping through each multi-value?  This is on Unidata 3.3.2 incidentally.



--


* This message has been scanned for viruses and dangerous content by
* Blairs of Scotland MailScanner, and is believed to be clean.
*
* This email and any files transmitted with it are confidential and
* intended solely for the use of the individual or entity to which they
* are addressed.
*
* If you have received this email in error please notify us at Blairs
* of Scotland via email at [EMAIL PROTECTED]

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
_
MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-25 Thread Peter Olson
i did a cut and paste with the code. by the way, it's still running! so
i think in some cases the trim would be a little quicker :)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Anthony Youngman
Sent: Thursday, March 25, 2004 7:47 AM
To: U2 Users Discussion List
Subject: RE: Optimisation ?


After you decrement LOP, you need to decrement MAX. Otherwise the loop will
be unable to get beyond 4.

Think about it - as soon as you delete a null value, you are guaranteeing
that "if null" will be true on your last pass, thereby decrementing LOP and
requiring another pass, which will do the same, which will do the same ...

That's why I ALWAYS do a "FOR I = MAX TO 1 STEP -1" style loop when coding
this sort of stuff ...

Bit slower, but far harder to mess up ...

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Olson
Sent: 25 March 2004 12:41
To: 'U2 Users Discussion List'
Subject: RE: Optimisation ?

LOL...

I can't get this to get out of the loop!!!

the trim crt'ed pretty quick... neat!

: L23   
0001:   PETE = 'THIS}IS }}}A TEST}}}'   
0002:   CRT TRIM( PETE , @VM )  
0003:   REC = PETE  
0004:   MAX = DCOUNT( REC< 1 > , @VM )  
0005:   FOR LOP=1 TO MAX
0006:  IF REC<1,LOP> = '' THEN  
0007: REC=DELETE(REC,1,LOP,0)   
0008: IF LOP = MAX THEN GO 300  
0009: LOP=LOP-1 
0010:  END  
0011:   NEXT LOP
0012: 300:  
0013:   CRT REC 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jonathan Leckie
Sent: Thursday, March 25, 2004 7:29 AM
To: [EMAIL PROTECTED]
Subject: Optimisation ?


I have the following piece of code :

IF REC<1> £ '' THEN
  MAX=DCOUNT(REC<1>,VM)
  FOR LOP=1 TO MAX
IF REC<1,LOP> = '' THEN
  REC=DELETE(REC,1,LOP,0)
  IF LOP = MAX THEN GO 300
  LOP=LOP-1
END
  NEXT LOP
END

I wonder could this simply be replaced with :

IF REC<1> £ '' THEN
  REC<1>=TRIM(REC<1>,@VM)
  GO 300
END

Can anyone see any problems with using TRIM to remove trailing, repeated and
initial value markers and therefore achieving the same effect without
looping through each multi-value?  This is on Unidata 3.3.2 incidentally.



-- 


* This message has been scanned for viruses and dangerous content by  *
Blairs of Scotland MailScanner, and is believed to be clean.*

* This email and any files transmitted with it are confidential and 
* intended solely for the use of the individual or entity to which they
* are addressed.
*
* If you have received this email in error please notify us at Blairs
* of Scotland via email at [EMAIL PROTECTED]


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Notice of Confidentiality:  The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee.  Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited.  If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it. 

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users





***

This transmission is intended for the named recipient only. It may contain
private and confidential information. If this has come to you in error you
must not act on anything disclosed in it, nor must you copy it, modify it,
disseminate it in any way, or show it to anyone. Please e-mail the sender to
inform us of the transmission error or telephone ECA International
immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911
7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1
212 582 2333.


***

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-user

RE: Optimisation ?

2004-03-25 Thread Anthony Youngman
After you decrement LOP, you need to decrement MAX. Otherwise the loop will be unable 
to get beyond 4.

Think about it - as soon as you delete a null value, you are guaranteeing that "if 
null" will be true on your last pass, thereby decrementing LOP and requiring another 
pass, which will do the same, which will do the same ...

That's why I ALWAYS do a "FOR I = MAX TO 1 STEP -1" style loop when coding this sort 
of stuff ...

Bit slower, but far harder to mess up ...

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Olson
Sent: 25 March 2004 12:41
To: 'U2 Users Discussion List'
Subject: RE: Optimisation ?

LOL...

I can't get this to get out of the loop!!!

the trim crt'ed pretty quick... neat!

: L23   
0001:   PETE = 'THIS}IS }}}A TEST}}}'   
0002:   CRT TRIM( PETE , @VM )  
0003:   REC = PETE  
0004:   MAX = DCOUNT( REC< 1 > , @VM )  
0005:   FOR LOP=1 TO MAX
0006:  IF REC<1,LOP> = '' THEN  
0007: REC=DELETE(REC,1,LOP,0)   
0008: IF LOP = MAX THEN GO 300  
0009: LOP=LOP-1 
0010:  END  
0011:   NEXT LOP
0012: 300:  
0013:   CRT REC 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jonathan Leckie
Sent: Thursday, March 25, 2004 7:29 AM
To: [EMAIL PROTECTED]
Subject: Optimisation ?


I have the following piece of code :

IF REC<1> £ '' THEN
  MAX=DCOUNT(REC<1>,VM)
  FOR LOP=1 TO MAX
IF REC<1,LOP> = '' THEN
  REC=DELETE(REC,1,LOP,0)
  IF LOP = MAX THEN GO 300
  LOP=LOP-1
END
  NEXT LOP
END

I wonder could this simply be replaced with :

IF REC<1> £ '' THEN
  REC<1>=TRIM(REC<1>,@VM)
  GO 300
END

Can anyone see any problems with using TRIM to remove trailing, repeated and
initial value markers and therefore achieving the same effect without
looping through each multi-value?  This is on Unidata 3.3.2 incidentally.



-- 


* This message has been scanned for viruses and dangerous content by  * Blairs of 
Scotland MailScanner, and is believed to be clean.*
   
* This email and any files transmitted with it are confidential and 
* intended solely for the use of the individual or entity to which they
* are addressed.
*
* If you have received this email in error please notify us at Blairs
* of Scotland via email at [EMAIL PROTECTED]


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Notice of Confidentiality:  The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee.  Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited.  If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it. 

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




***

This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Optimisation ?

2004-03-25 Thread Peter Olson
LOL...

I can't get this to get out of the loop!!!

the trim crt'ed pretty quick... neat!

: L23   
0001:   PETE = 'THIS}IS }}}A TEST}}}'   
0002:   CRT TRIM( PETE , @VM )  
0003:   REC = PETE  
0004:   MAX = DCOUNT( REC< 1 > , @VM )  
0005:   FOR LOP=1 TO MAX
0006:  IF REC<1,LOP> = '' THEN  
0007: REC=DELETE(REC,1,LOP,0)   
0008: IF LOP = MAX THEN GO 300  
0009: LOP=LOP-1 
0010:  END  
0011:   NEXT LOP
0012: 300:  
0013:   CRT REC 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Jonathan Leckie
Sent: Thursday, March 25, 2004 7:29 AM
To: [EMAIL PROTECTED]
Subject: Optimisation ?


I have the following piece of code :

IF REC<1> £ '' THEN
  MAX=DCOUNT(REC<1>,VM)
  FOR LOP=1 TO MAX
IF REC<1,LOP> = '' THEN
  REC=DELETE(REC,1,LOP,0)
  IF LOP = MAX THEN GO 300
  LOP=LOP-1
END
  NEXT LOP
END

I wonder could this simply be replaced with :

IF REC<1> £ '' THEN
  REC<1>=TRIM(REC<1>,@VM)
  GO 300
END

Can anyone see any problems with using TRIM to remove trailing, repeated and
initial value markers and therefore achieving the same effect without
looping through each multi-value?  This is on Unidata 3.3.2 incidentally.



-- 


* This message has been scanned for viruses and dangerous content by  
* Blairs of Scotland MailScanner, and is believed to be clean.
*   
* This email and any files transmitted with it are confidential and 
* intended solely for the use of the individual or entity to which they
* are addressed.
*
* If you have received this email in error please notify us at Blairs
* of Scotland via email at [EMAIL PROTECTED]


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Notice of Confidentiality:  The information included and/or attached in this
electronic mail transmission may contain confidential or privileged
information and is intended for the addressee.  Any unauthorized disclosure,
reproduction, distribution or the taking of action in reliance on the
contents of the information is prohibited.  If you believe that you have
received the message in error, please notify the sender by reply
transmission and delete the message without copying or disclosing it. 

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users