FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour String problem
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
String problem
Posted: Tue Aug 14, 2007 10:00 AM
Hi,

Does enyone know why I get twice the same result.

FUNCTION test()
   local cValue := Space( 256 )
   GetEnvironmentVariable( "USERPROFILE", cValue, Len( cValue ) )
   cValue=alltrim(cValue)
   MsgInfo(cValue)
   cValue+='\Test'
   MsgInfo(cValue)
RETURN


Thanks,
Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
String problem
Posted: Tue Aug 14, 2007 10:54 AM
Marc,

Do it this way:
FUNCTION test() 
   local cValue := GetEnv( "USERPROFILE" )
   cValue+='\Test' 
   MsgInfo(cValue) 
RETURN
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
String problem
Posted: Tue Aug 14, 2007 12:12 PM

Thanks Antonio, it's working fine now.

Regards,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion