Re: [2] using variables to index into substrings
Posted in 2000
Here's the "SQL" to register it:
create function prandom ()returns integer
external name "$INFORMIXDIR/extend/cfn/cfn.bld(prandom)"
language c;
From: "Andrew McPherson" <amcphers@dcc.govt.nz>
>
>All,
>I would *really* like to use variables to index substring arguments, but
>the
>Infomix 9 manual blithely states that only constants are allowed to be used
>to index substrings. Duh!
>
>e.g. something like:
> .......
> DEFINE in_index INTEGER;
> DEFINE out_index INTEGER;
> DEFINE in_str CHAR(60);
> DEFINE out_str CHAR(4);
> .......
> LET out_str[1] = in_str[1]; --should work
>
> LET out_str[out_index] = in_str[in_index]; --not allowed
> .......
>
>Has anyone written DataBlade wrappers to the std C library for string
>handling routines like substr?
>
>many thanks,
>Andrew.
>
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com