Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO...DELIMITED bug?
Message
From
19/10/2006 05:40:27
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
19/10/2006 04:27:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01163003
Message ID:
01163224
Views:
9
>>>>I think I have come across a bug in VFP9 SP1.
>>>>Using the COPY TO command when a field is one character long and it's empty the output file will have a space in that position but if the field is two or more characters long the position will not have the space.
>>>>
>>>>
>>>>CREATE CURSOR test1 (f3 c(3),f2 c(2),f1 c(1),n1 n(1,0),n2 n(3,1))
>>>>APPEND BLANK
>>>>COPY TO test1.txt DELIMITED WITH "" WITH CHARACTER "|"
>>>>
>>>>
>>>>Output File:
>>>>
>>>>|| |0|0.0
>>>>
>>>>
>>>>Note that the field f1 in the output file shows a space when it should be empty like f2 and f3.
>>>>
>>>>Has anyone else ever ran into this before?
>>>>
>>>>Dennis
>>>
>>>So what the bug is?
>>>Cetin
>>
>>expected
>>
>><   |  | |0|0.0>
>>
>
>Within a delimited file have a lot of redundant spaces? I don't see a difference having 0 or more spaces to represent blank data. Ideally I'd expect:
>
>|||0|0.0
>
but I don't see wasting a space as a bug.
>Cetin

Cetin,

you don't know what is done with the data, so it should be consistent.
Just play with VFP's GETWORDNUM() and you will see what a extra space may be good for.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform