RE: [Info-ingres] abf 3gl function



Hi Gareth,

C has the strtok function available if you #include <string.h>

Martin Bowes
>
> Thanks for your replies.
> I think I've nailed it.
> One other quick question... .net has a split function eg.
> Dim myString() as string
> Mystring = split(anotherstring,"|")
> This will chop up anotherstring where pipe is the delimiter and places
> them into the array of strings myString. Are there any similar
> functions in C or ingres? Cheers -----Original Message----- From: Roy
> Hann [mailto:specially@xxxxxxxxxxxxxxxxxxxxx] Sent: 23 November 2005
> 08:47 To: info-ingres@xxxxxxxxxxxxxxx Subject: Re: [Info-ingres] abf
> 3gl function "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
>
> _______________________________________________
> Info-ingres mailing list
> Info-ingres@xxxxxxxxxxxxxxx
> http://mailman.cariboulake.com/mailman/listinfo.py/info-ingres
>
>
>
> Cymraeg:-
> Mae'rnegeshonyngyfrinachol.Osnadchiyw'rderbynnyddybwriedidynegesareigy
> fer,bydd wchmorgaredigârhoigwybod i'ranfonyddynddi-
> oed.Dylidystyriedunrhywddatganiadauneusylwadauawneiruchodynrhaipersono
> l,acnido angenrhaidynrhaio
> eiddoYmddiriedolaethGIGBroMorgannwg,nacunrhywrangyfansoddolohoninachor
> ffcysyllti edig.
>
> CofiwchfodynymwybodoleibodynbosiblybydddisgwyliYmddiriedolaethGIGBroMo
> rgannw groicyhoeddusrwyddigynnwysunrhywebostneu
> ohebiaethadderbynnir,ynunolagamodau'rDdeddfRhyddidGwybodaeth2000.Igael
> mwyow ybodaethamRyddidGwybodaeth,cofiwchgyfeirio
> atwefanYmddiriedolaethGIGBroMorgannwgarwww.bromor-tr.wales.nhs.uk
>
> English:-
> Thismessageisconfidential.Ifyouarenottheintendedrecipientofthemessaget
> henpleaseno tifythesenderimmediately.
> Anyofthestatementsorcommentsmadeaboveshouldberegardedaspersonalandnotn
> eces sarilythoseofBroMorgannwgNHSTrust,any
> constituentpartorconnectedbody.
>
> Pleasebeawarethat,underthetermsoftheFreedomofInformationAct2000,BroMor
> gannwg NHSTrustmayberequiredtomakepublicthe
> contentofanyemailsorcorrespondencereceived.ForfurtherinformationonFree
> domofInform ation,pleaserefertotheBroMorgannwgNHS
> Trustwebsiteatwww.bromor-tr.wales.nhs.uk.
>
>



.