String problem

String problem

Postby Marc Vanzegbroeck » Tue Aug 14, 2007 10:00 am

Hi,

Does enyone know why I get twice the same result.

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


Thanks,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby Antonio Linares » Tue Aug 14, 2007 10:54 am

Marc,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marc Vanzegbroeck » Tue Aug 14, 2007 12:12 pm

Thanks Antonio, it's working fine now.

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests