Обсуждение: Define command

Поиск
Список
Период
Сортировка

Define command

От
"Dr. Michael Meskes"
Дата:
I found some time today and added the exec sql define command to ecpg.
However, since I do not have the specs with me I am not completely sure the
syntax and semantics is correct.

I believe the syntax wax: exec sql define AMOUNT is 5;

As for the semantics I think this should mean to replace AMOUNT by the value
5 (of course) in the complete file. That is also replace inside the C part.
I'm not sure about that, but otherwise it would be impossible to parse the
variable declarations.

Also it cannot do variable expansions, just simple string for string
replacements. Since ORACLE doesn't seem to support it at all, could anyone
wit a system that does support this feature check whether this works:

exec sql define S(X) is X=X+1;

I believe Informix does support defines.

Michael
--
Dr. Michael Meskes        meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!    Use Debian GNU/Linux!