Dim arrays & mapping fields

Jay R. Ashworth jra at baylink.com
Thu Jul 29 11:32:23 PDT 2004


On Thu, Jul 29, 2004 at 02:03:54PM -0400, John Esak wrote:
> The code would work with the full associated field group system... in other
> words not just pair groups. There are a0) through a9) tow work with. (a0) is
> the same as a) ).  Anyway, you can do this:
> 
> @wlfa)    if:
>         then: a9)=a3) * a8);  display; end
> 
> Which might mulitply the price times the quantity to provide an extension
> when you leave a description field...  Or you can do something more specific
> by overlaying an array over an associated fiedl group. (in which case, the
> fields _must_ be contiguous. So that:
> 
> 
>       5.  a) item#      5   .0
>       6.  a) item#      5   .0
>       7.  a) item#      5   .0
>       8   a) item#      5   .0
> 
> and   then: dim array[4]:5
> 
> would allow you to do:
> 
> 
>   @wlfa)  if:
>         then: ext[@af]=prc[@af] * qty[@af];  display;  end
> 
> (assuming those other arrays were also defined over contiguous groups of
> real fields, you can essentially write one line of code to handle a
> screenful of line items.

Oh yeah.  I was covering his original question, which stems from *not*
having his AF groups be contiguous.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the Filepro-list mailing list