Re: [Info-ingres] abf 3gl function
- From: "Roy Hann" <specially@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 23 Nov 2005 08:46:52 -0000
"Nick" <Nick@xxxxxxxxxxx> wrote in message
news:mailman.1132692301.7020.info-ingres@xxxxxxxxxxxxxxxxxx
> Could you not do something like this
>
> char *myfunction(char *mystrvar, int maxlen)
> {
> strcpy(mystrvar, "some string that is no longer than maxlen chars");
>
> return;
> }
Even if that worked, it would be a leap of faith on the part of the caller.
Returning a pointer to a static array would be the safe solution.
Roy
.
- References:
- RE: [Info-ingres] abf 3gl function
- From: Nick
- RE: [Info-ingres] abf 3gl function
- Prev by Date: Re: What animal should Ingres be?
- Next by Date: Re: [Info-ingres] Ingres/STAR, ING_SYSTEM_SET and set lockmode
- Previous by thread: RE: [Info-ingres] abf 3gl function
- Next by thread: RE: [Info-ingres] abf 3gl function
- Index(es):