>Hi Fabio,
>
>I think it's a bug.
>
>>HI,
>>
>>On VFP, any string function support CHR(0).
>>
>>But GETWORDNUM and GetWordCount no.
>>
>>
>>x='a'+CHR(0)+'b'
>>? GetWordCount(m.x,CHR(0)),GETWORDNUM(m.x,1,CHR(0))
>>? ALINES(ax,x,CHR(0)),ax[1],ax[2]
>>
>>
>>Ill-fatedly, GETWORDNUM(m.dllcPrm, 1, CHR(0)) would be the best VFP function in order to extract one VFP string from one "zero string" of one DLL in C.
>>
>>
>>? SUBSTR(m.dllcPrm,1,AT(CHR(0),m.dllcPrm)-1)
>>
>>
>>Another question:
>>because execution time for ( and m.dllcPrm long )
>> SUBSTR(m.dllcPrm,1,AT(CHR(1),m.dllcPrm)-1)
>>respect to
>> GETWORDNUM(m.dllcPrm, 1, CHR(1))
>>is faster,
>>
>>GETWORDNUM() it can be improved.
>>
>>Fabio
Sergey,
This is a problem because of the fact that in C strings are terminated by CHR(0)and was a problem in the same function in Foxtools. The workaround is to simply use STRTRAN() to convert the CHR(0) to another character (i.e. CHR(13)).
George
Ubi caritas et amor, deus ibi est