Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where ALLTRIM fears to tread..
Message
From
03/06/1998 05:06:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/06/1998 04:33:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00104289
Message ID:
00104292
Views:
23
>I have a strange problem over which I am ripping out what little hair I have left. It is as follows:
>
>I have an array of investemnt policy status's set up along hte lines of:
> Status(1) = "On Risk"
> Status92) = "Proposed"
> Status(3) = "Cancelled"
> ...
> ..
>
>And a function set up to try and locate a certain policy type within that array based on the contents of a field held on a table. The field holds the corresponding names but in a c(20) field size. I am passing to the function this field name as an lParameter cStatus, trimming the spaces with ALLTRIM(cStatus) and then doing an ASCan(Status, cStatus). BUT noting is being found as the spaces are not being trimmed off by ALLTRIM.
>
>Does anyone recognise this problem. Everything seems to work fine outside the programm, if I test things out in the comand window the field gets trimmed and the array element is found. But the minute I run the code, ALLLTRIM stops working.
>
>Any help would be greatly appreciated.
>
>Ashley
>AssureSoft.
Ashley,
I faced similar problem years ago in FPDOS 2.x and replaced alltrim with ltrim(trim()). Still don't know why it fails but strange adding a slight delay makes it work (ie: stepping in debug).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform