Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An FPDos bug ?
Message
From
01/07/1999 05:48:10
 
 
To
01/07/1999 02:36:44
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Miscellaneous
Thread ID:
00234624
Message ID:
00236343
Views:
22
>Thanks Norm, Ed and John,
>
>The returned value is uniform (I am converting something like 8-184-33 into
>08018400033) so I don't think that is the problem.
>
>What I had to do is to format in a latter step. In some cases I like using UDFs in SELECTs because the code reads neater.
>
>But the malfunction of TRIM surprised me!

Why? Surely you realize that in FoxPro, fields are of a uniform length, and TRIM() is not, so it had to either truncate some values or pad others to make the field length in the output of the SELECT fixed length...

>
>Thanks again.
>
>Alex
>
>
>>Hola Alejandro ---
>>
>>Point One: Try to avoid using UDF's in SELECT statements.
>>Point Two: TRIM? Output len from the function should/must be uniform.
>>
>>
>>>
>>>While using FP DOS I call a UDF from a SQL SELECT. I was surprised to find out that TRIM() does not work seem to work within the function! The code is this:
>>>
>>>SELECT FormatData(cX) AS cX FROM xx INTO CURSOR Y
>>>
>>>FUNCTION FormatData
>>>PARAMETER tcData
>>>lcNewData = ...
>>>RETURN lcNewData
>>>
>>>
>>>After getting funny results I paused within the function and
>>>tested through the DEBUG window that TRIM("aa ")+"." is not
>>>"aa." Does anybody know why? Have I gone through the looking glass?
>>>
>>>TIA,
>>>
>>>Alex
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform