String problem

Post Reply
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

String problem

Post by Marc Vanzegbroeck »

Hi,

Does enyone know why I get twice the same result.

Code: Select all

FUNCTION test()
   local cValue := Space( 256 )
   GetEnvironmentVariable( "USERPROFILE", cValue, Len( cValue ) )
   cValue=alltrim(cValue)
   MsgInfo(cValue)
   cValue+='\Test'
   MsgInfo(cValue)
RETURN
Thanks,
Marc
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Marc,

Do it this way:

Code: Select all

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

Antonio Linares
www.fivetechsoft.com
Marc Vanzegbroeck
Posts: 1102
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium
Contact:

Post by Marc Vanzegbroeck »

Thanks Antonio, it's working fine now.

Regards,
Marc
Post Reply