Subject Re: [IB-Architect] Declare Variables as Domains
Author Jim Starkey
At 08:41 AM 12/13/01 +0100, Martijn Tonies wrote:
>Hi,
>
>> But on use the of global variable based variables, I applaud it
>> wholeheartedly. From the very dawn of time (yea, even before the
>> first line of engine code was typed on the Pro-350) GPRE supported
>> variations on "declare foo based_on bar" where "bar" was a global
>> variable. The practice is excellent for both clarity and maintainability.
>
>If it comes to 'based on', what about the feature in Oracle that let's you
>use the same datatype as existing columns?
>
>declare variable emp_key EMPLOYEE%EMP_NO;
>
>This makes variable emp_key have the same type as the column in
>EMPLOYEE (don't watch the syntax) and if you change the type
>of EMP_NO, you would have to re-compile the procedure/trigger
>(see also 'Invalid Database Objects' thread)...
>
>I guess this is sort of a domain (EMP_NO), but without the
>constraints...
>

Sure, why not?

I have a philosphical belief that domains (global field definitions)
should be widely used. On the other hand, I haven't bothered to
implement them in Netfrastructure because nobody seems to care.

Jim Starkey