Thanks for the input !
Here are some more differences that I have found so far.
1. Sys(5) is similar to the X#/VO CurDrive()
while Sys(5) returns e.g. "D:", the X#/VO CurDrive() returns "D"
2. Both know the CurDir() function.
while Fox returns e.g. "\TEST\ , the X#/VO CurDir() returns "TEst"
But the main difference seems to be the SET DEFAULT TO behaviour. Because the Fox SET DEFAULT TO changes the current directory, the sys (5) and CurDir() content depend on this setting. I think VFP still works the same way ?
Here's the Foxpro code i'm using.
clear
set talk off
cStartDir = Set ("default") + CurDir()
? cStartDir
? Set ("default") && "D:"
? CurDir() && "\"
? sys(5) && "D:"
? FullPath ( Set ("default" ) ) && "D:\"
? sys(5) + CurDir() && "D:\"
?
set default TO d:\test
? Set ( "default" ) && "D:"
? CurDir() && "\TEST"\
? sys(5) && "D:"
? FullPath ( Set ("default" ) ) && "D:\TEST\"
? sys(5) + CurDir() && "D:\TEST\"
?
set default TO f:\xide
? Set ( "default" ) && "F:"
? CurDir() && "\XIDE\"
? sys(5) && "F:"
? FullPath ( Set ("default" ) ) && "F:\XIDE\"
? sys(5) + CurDir() && "F:\XIDE\"
?
Set default TO (cStartDir)
? Set ( "Default" ) && "D:"
? CurDir() && "\"
? sys(5) && "D:"
? FullPath ( Set ("default" ) ) && "D:\"
? sys(5) + CurDir() && "D:\"
and here's some code that shows how X#/VO works.
FUNCTION Start( ) AS VOID
? GetDefault() // C:\XIDE\Projects\Project1\Bin\Debug
? CurDrive() // C
? CurDir() // XIDE\Projects\Project1\Bin\Debug
?
DirChange ( "D:\TEst" )
?
? GetDefault() // C:\XIDE\Projects\Project1\Bin\Debug // <-- still the same
? CurDrive() // D
? CurDir() // TEst
?
SetDefault ( "C:\windows")
? GetDefault() // C:\windows
? CurDrive() // D <-- still the same
? CurDir() // TEst <-- still the same
Because my old Foxpro doesn't know dir commands like CHDIR: If a directory is changed, what is afterwards the content of Sys(5), CurDir() and Set("Default") ?
regards
Karl-Heinz