>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