Re: Setting database at runtime with 4GL
Posted in 1995
In article <3g5pgl$efs@cssun.mathcs.emory.edu>, jparker@hpbs3645.boi.hp.com (Jack Parker) wrote: > > *Why* do you recommend against DEFINEing LIKE database items? > > > > I've found it to be utterly invaluable when a new client decides they > > need to (say) hold quantities to 3 decimal places, or support 20 character > > product codes, or whatever other requirement they have. > > Sound words. Allow me to represent the opposing argument. > [ example of why you might not want to use LIKE deleted ] > For this reason we tend to stay away from some of 4GLs nice features like > RECORD LIKE and SELECT * or INSERT INTO table VALUES (record.*). Woa back! My turn to be misunderstood: I was advocating the use of LIKE, but absolutely NOT the use of RECORD LIKE, SELECT * or INSERT INTO TABLE VALUES (record.*). These are evil evil EVIL abominations. 100% certified accidents waiting to happen. I start foaming at the mouth and get rather violent when I encounter code like that. When I want to use a variable to store a product code *I* think it's far cleaner to DEFINE l_prodno LIKE product.prodno, rather than CHAR(15). > Windows/NT - from the people who brought you edlin. That's the funniest thing I've seen in a long time. Thankyou Jack! - Kerry S --------------------------------------,------------------------------------- Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* | mathcs.emory.edu:/pub/informix/faq/* +64 9 377-4473 (work) 266-6011 (home) | http://www.garpac.com/informix.html