Subject Re: [IB-Architect] Declare Variables as Domains
Author Martijn Tonies
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...

--
Martijn Tonies
Upscene Productions

InterBase Workbench - The Developer Tool for InterBase
http://www.interbaseworkbench.com

"Experience is what you get when you didn't get what you wanted"