FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Char values automatically left justified building an array
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Char values automatically left justified building an array
Posted: Wed Dec 21, 2016 05:28 PM
To All

I have a Sql Primary key value that is char(18) .. When I generate a random key I sometimes get a value like this with leading and trailing spaces .. and that is fine.
Code (fw): Select all Collapse
aEmp := {}

cName := "Rick Lipkin"
cEid     := "     12345678    "    

AAdd( aEmp, {cName,cEid} )


When I go to load the above character value cEid into an array the char value is truncated and loads as a left justified value .. similar to :

Code (fw): Select all Collapse
       A                 B
|Rick Lipkin    |12345678      |


Is there a way to initialize the array to accept the 'exact' value I am loading to the array element ?

Thanks
Rick Lipkin
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Char values automatically left justified building an array
Posted: Thu Dec 22, 2016 03:51 AM
When I go to load the above character value cEid into an array the char value is truncated and loads as a left justified value

No. The value is not trimmed. Please check again.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion