Fabio,
SELECT can not return a variable length field. The size of the field will be determined by VFP examining a row from the table, it's usually the first row, but doesn't have to be. So if VFP determines that rtrim() returns a string of length 10 it will size the field c(10) and values that are longer than that in the source will actually be truncated.
It doesn't matter what the INTO clause is, array or cursor the column size is fixed.
It's easiest to just rtrim() the array elements in a loop. VFP is pretty fast (it's nearly as fast as C/C++) for most string operations.
>With a SELECT, i cannot put trimmed string on array.
>
>
>CLEAR
>CREATE CURSOR myCursor (f1 c(20))
>INSERT INTO myCursor VALUES ('A')
>
>SELECT RTRIM(f1) FROM myCursor INTO ARRAY aResult
>? LEN(aResult[1])
>
>
>This because SELECT .. INTO ARRAY aResult is implement with a tmpCursor (?):
>
>SELECT ... INTO CURSOR tmpCursor
>COPY TO ARRAY aResult
>USE IN tmpCursor
>
>
>The only way is to trim array elements with a FOR Cycle ?