>>>>On VFP9 binary VFP doesn't trim 0h0 and copy the hex syntax,
>>>>and for a varchar is not trimmed also;
>>>>but a char ( binary ) is trimmed and then ( before VFP9 )
>>>>you cannot copy into a text a binary field.
>>>>
>>>>
>>>>
>>>>CREATE CURSOR test1 (f1 c(1),v3 V(3) DEFAULT 'v ',c3 c(3) DEFAULT 'c ' NOCPTRANS ,q3 q(3) DEFAULT 0h0000 )
>>>>APPEND BLANK
>>>>COPY TO test1.txt DELIMITED WITH "" WITH CHARACTER "|"
>>>>MODIFY FILE test1.txt
>>>>
>>>>
>>>>I think that this is not a casual bug
>>>>but an awkward attempt (of the team) to interpret the developer mind;
>>>>as a CHAR(1) as flag is used, often a space can be meaningful
>>>>and in data exchanges doesn't trim could simplify the operation.
>>>>Vice versa, CHAR(N=2,3,...) hardly it is a flag,
>>>>and therefore the team has thought of trim the field.
>>>>
>>>>But,
>>>>who write a dev env it doesn't have to think about thing it can do.
>>>>COPY is a copy, then if a field is SPACE(3) copy must put 3 spaces into the target.
>>>>
>>>>Fabio
>>>
>>>Fabio,
>>>I didn't understand. No problem. Maybe you meant sort of SDF.
>>>Cetin
>>
>>SDF is different
>>
>>CREATE CURSOR test1 (n1 N(10,3) DEFAULT 1.2,v1 V(10) DEFAULT 'v ',n2 N(10,3) DEFAULT 1.2)
>>APPEND BLANK
>>COPY TO test1.txt DELIMITED WITH "" WITH CHARACTER "|"
>>
>>DEFINE WINDOW output AT 0,0 SIZE 10,50 IN DESKTOP FONT "Courier New",20 CLOSE
>>MOVE WINDOW output CENTER
>>
>>ACTIVATE WINDOW output
>>
>>? "DELIMITED"
>>? FILETOSTR("test1.txt")
>>? "SDF"
>>COPY TO test1.txt TYPE SDF
>>? FILETOSTR("test1.txt")
>>
>
>Fabio,
>I didn't say SDF is same or simply SDF, I said "sort of SDF".
Right. I don't want to be discourteous,
"sort of SDF" it doesn't exist.
In our discussion, there are three types of files:
1 SDF
2 delimited not trimmed
3 delimited
You call 2 = "sort of SDF", but the only thing that can be said is that "it is not a sdf".
>PS: Why are you testing with varchar?
It is a field,
and with this example I (try) show you that
there is no motive to remove the final spaces in a delimited text,
in fact,
the VFPT's developer that has implemented "COPY TO" for the fields varchar in VFP9
has not removed the spaces
>In VFP there is not true varchar, is there?
on a VFP application the varchar is a true ( as it has to be ) varchar,
it is the allocation in the dbf and an index that are not varchar.
>Cetin
Fabio