Re: Writing Reusable Informix-4GL at www.iiug.org
Posted in 1997
kerry@kcbbs.gen.nz (Kerry Sainsbury) wrote: Looks good. For the array section, you can reuse the same code that you had in the component section. The business functions in order.4gl work on the modular variables in that file. If you need to work on multiple order records in an array you need to get the values into the modular variables. You just need to add a function setOrder which will set the modular variables in order.4gl. The array file (module.4gl) has a function setOrderLine(line) which takes the element specified and call setOrder. That way you can carry on using the same functions such as calculate_price, etc. on all the records in the array. The module.4gl is used purely to manage storage. You can then have a module.4gl that uses arrays, another that uses files, or scrolling cursors, and you chose at compile time which one you want. >Team, >I've just added the "chapter" I wrote about writing reusable 4GL to >the articles page at www.iiug.org. >This is the full-sized version of the original (and somewhat infamous) >"condom machine" article I wrote a lifetime ago. It was originally >destined for an Informix book that died. >Check it out at: >http://www.iiug.org/techinfo/articles/articles_top.html >.. and feel free to comment. >Cheers, >Kerry S >------------------------------------,------------------------------------------ >Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ v2.8 March 1997 >Quanta Systems, Auckland | http://www.iiug.org/techinfo/faq/ >New Zealand. Work: +64 9 377-4473 | ftp://ftp.iiug.org/pub/informix/faq > Home: +64 9 279-3571 | ftp://kcbbs.gen.nz:/pub/informix/ David W Chan GO5 Limited david@go5.com (work) dwc@cix.compulink.co.uk (home)