Re: vector difference



On Aug 6, 4:31 pm, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx> wrote:
Gordon Sande wrote:
On 2008-08-06 15:36:01 -0300, nos...@xxxxxxxxxxxxx (Richard Maine) said:
utab <umut.ta...@xxxxxxxxx> wrote:
real :: a(4) = (/1.,2.,3.,4./)
real :: b(1) = (/2., 3./)
(snip)
result is to be
res = (/1., 4./)
I wondered if there is a quick way to accomplish
this through intrinsic functions?
I'd say that "pack" and "any" are your friends. I'd probably do
something like

(snip of actual code using PACK and ANY)

As well as being hard to read they have the
disadvantage that the algorithms
being suggested are quadratic for a well/over researched problem that has
linear (and a bit) solutions.

[snip]

With linear traversal through two sorted lists one can
choose to remove all matching element, or only one in
list A for each match to list B.

Just find a COBOL programmer to modify his program for the "balance
line algorithm" (aka "three way merge"). Updating a "master
file" (large list) based on a "transaction file" (small list) is a
Jurassic problem in business d.p.!

- e

.



Relevant Pages

  • Re: Windows/Macro Language Info?
    ... Having written one, that is the skeleton ... I mean, you are a COBOL programmer, aren't you? ... >last time you posted code publicly, and attacked code I had posted publicly, ...
    (comp.lang.cobol)
  • Re: How to compile MicroFocus COBOL/2 Ver 1.2.29 L2.2 rev 003 - on DOS 6.2 machine ?
    ... And to add to what DD has written, I think you are on a hiding to nothing trying to fathom this old compiler. ... To my mind you are dead in the water - it truly isn't worth the frustration. ... Given you found a COBOL programmer who knows his stuff, has done work in say Java or C-family, then he can analyze the source and revamp into a new application, at a price, in either of those languages or do it through dotNet. ...
    (comp.lang.cobol)