Kevin,
That should work just fine, but here's a (IMO) nicer way to get that info:
cRetVal = GETWORDNUM(ID(), 1, '#')
Also, notice that both of those return a space at the end of the machine name. If you don't want that space, use:
cRetVal - GETWORDNUM(ID(), 1, ' #')
HTH,
Chad
>From time to time I take work home. There are places in my app where I have:
>
>
>SET PROCEDURE TO d:\projects\vfp1\proj folder\some.prg
>
>
>At home, my projects are on a different PC on the network, with only the drive letter
>being different. Therefore the above line of code causes an error
>
>I was considering something like the following:
>
>
>
>PROCEDURE GetDevLoc()
>
> LOCAL cRetVal
> cRetVal = SUBSTR(SYS(0), 1, AT("#", SYS(0))-1)
>
>ENDPROC
>
>
>Which I could then use:
>
>
>SET PROCEDURE TO GetDevLoc() + "\projects\vfp1\proj folder\some.prg"
>
>
>Anyone have a better idea?
_________________________________
There are 2 types of people in the world: