Local cInvPath
cInvPath := WorkDir()
Eg Set Path cInvPath
Eg SetPath( cInvPath)
Etc.
Is it possible? If so, how please.
Setting a Path using variables.
Setting a Path using variables.
Do you never try?
Xide: New X#-runtime app
Function Start
LOCAL cInvPath
? cInvPath := WorkDir()
//Set Path cInvPath
SetPath( cInvPath)
RETURN
Compiles and runs.
What do you want to achieve?
As Robert wrote, we have no crystal-ball here to deduct your wishes...
Karl
Xide: New X#-runtime app
Function Start
LOCAL cInvPath
? cInvPath := WorkDir()
//Set Path cInvPath
SetPath( cInvPath)
RETURN
Compiles and runs.
What do you want to achieve?
As Robert wrote, we have no crystal-ball here to deduct your wishes...
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Setting a Path using variables.
In VO does it Karl? It won't work for me. It compiles ok, but the result is:
CWORKDIR; (CWORKDIR + "DB"); (CWORKDIR + "INVOICES"); (CWORKDIR + "RPT")
Code is (no Crystal ball required I wouldn't have thought, particularly as I gave it in the initial post) ...
LOcal cWorkDir
cWorkDir := WorkDir()
Set Path to cWorkDir, (cWorkDir + "Db"), (cWorkDir + "Invoices"), (cWorkDir + "Rpt")
Obviously, I would have thought, I want to Set the path for the app. Wasn't all that spelt out?
CWORKDIR; (CWORKDIR + "DB"); (CWORKDIR + "INVOICES"); (CWORKDIR + "RPT")
Code is (no Crystal ball required I wouldn't have thought, particularly as I gave it in the initial post) ...
LOcal cWorkDir
cWorkDir := WorkDir()
Set Path to cWorkDir, (cWorkDir + "Db"), (cWorkDir + "Invoices"), (cWorkDir + "Rpt")
Obviously, I would have thought, I want to Set the path for the app. Wasn't all that spelt out?
Setting a Path using variables.
Seems this code did the trick:
SetPath((cWorkDir + "Db") + "; " +(cWorkDir + "Invoices") + "; " + (cWorkDir + "Rpt"))
which gives me using GetCurPath()
C:cavo28BinDb; C:cavo28BinInvoices; C:cavo28BinRpt
SetPath((cWorkDir + "Db") + "; " +(cWorkDir + "Invoices") + "; " + (cWorkDir + "Rpt"))
which gives me using GetCurPath()
C:cavo28BinDb; C:cavo28BinInvoices; C:cavo28BinRpt
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Setting a Path using variables.
Jeff,
Assuming you working with X#, please remember, not all "commands" are available out the box. Have a look at XSharpDefs.xh, that are the commands currently implemented.
Having said that, if you want X# to understand your "set path to", just edit the XSharpDefs.xh in the X# include folder to include the following:
You could also learn a new .NET feature while we at it, no worries about including "", or ending with "":
HTH,
I am not trying to bash you here, but please for future reference. Are you using VO 2.8 or are you trying to do this with X#?BiggyRat wrote:In VO does it Karl? It won't work for me. It compiles ok, but the result is:
CWORKDIR; (CWORKDIR + "DB"); (CWORKDIR + "INVOICES"); (CWORKDIR + "RPT")
Code is (no Crystal ball required I wouldn't have thought, particularly as I gave it in the initial post) ...Obviously, I would have thought, I want to Set the path for the app. Wasn't all that spelt out?Code: Select all
LOcal cWorkDir cWorkDir := WorkDir() Set Path to cWorkDir, (cWorkDir + "Db"), (cWorkDir + "Invoices"), (cWorkDir + "Rpt")
Assuming you working with X#, please remember, not all "commands" are available out the box. Have a look at XSharpDefs.xh, that are the commands currently implemented.
Having said that, if you want X# to understand your "set path to", just edit the XSharpDefs.xh in the X# include folder to include the following:
Code: Select all
#command SET PATH TO <*path*> => SETPATH(<(path)>:Replace(",", ";"))
Code: Select all
Path.Combine(cWorkDir, "Db")
Path.Combine(cWorkDir, "Invoices")
Path.Combine(cWorkDir, "Rpt")
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Setting a Path using variables.
I understand you're not trying to bash me Johan lol. It's just that I post in the VO NG, and get chided for that "No one reads it here, you must post it in the XSharp forum" So I post it in the X# forum, under the VO and Vulcan section, so to me it's obvious its VO I'm running, otherwise I'd be posting in the X# forum here wouldn't I?
Sorry if it sounds harsh, but I'm not having a great time atm, So my patience isn't what it usually is.
Having said that, the RPT folder now seems pointless as no matter what I try, if the RPT isn't in the root folder, it isn't found apparently. I was just trying to get things tidy.So failing that, I moved the rpt files back to the root folder...
And... Just for the record IF I write any further programs, I WILL use X#, but NOT until DBFCDX support is implemented. It's going to be a big enough learning curve for me as I don't do this stuff day in day out like you guys (though I'd like to), without learning new SEEK/ORDER/FOR/WHILE etc etc conditions I find the whole idea of an Index "Bag" much better and neater.
Sorry if it sounds harsh, but I'm not having a great time atm, So my patience isn't what it usually is.
Having said that, the RPT folder now seems pointless as no matter what I try, if the RPT isn't in the root folder, it isn't found apparently. I was just trying to get things tidy.So failing that, I moved the rpt files back to the root folder...
And... Just for the record IF I write any further programs, I WILL use X#, but NOT until DBFCDX support is implemented. It's going to be a big enough learning curve for me as I don't do this stuff day in day out like you guys (though I'd like to), without learning new SEEK/ORDER/FOR/WHILE etc etc conditions I find the whole idea of an Index "Bag" much better and neater.
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Setting a Path using variables.
Hi Jeff,
Maybe just start your Subject with "VO 2.8" etc. It might already help putting us in the correct frame of mind.
Well, sometimes our assumptions are incorrect. I "assumed" you trying to make VO code run in X#... Ok, I will make a mental note.BiggyRat wrote:It's just that I post in the VO NG, and get chided for that "No one reads it here, you must post it in the XSharp forum" So I post it in the X# forum, under the VO and Vulcan section, so to me it's obvious its VO I'm running, otherwise I'd be posting in the X# forum here wouldn't I?
Well, hopefully that also explain why it might seem our patience with you also went out the backdoor...Sorry if it sounds harsh, but I'm not having a great time atm, So my patience isn't what it usually is.
I have lost track about the original question. If you want to keep it out the forum, send me a private mail and I will try and assist getting your paths sorted out. The spaghetti style of the forums don't help...Having said that, the RPT folder now seems pointless as no matter what I try, if the RPT isn't in the root folder, it isn't found apparently. I was just trying to get things tidy.So failing that, I moved the rpt files back to the root folder...
It seems DBFCDX will soon be implemented, so we would gladly accept you in the X# community (not that you should feel excluded).And... Just for the record IF I write any further programs, I WILL use X#, but NOT until DBFCDX support is implemented. It's going to be a big enough learning curve for me as I don't do this stuff day in day out like you guys (though I'd like to), without learning new SEEK/ORDER/FOR/WHILE etc etc conditions I find the whole idea of an Index "Bag" much better and neater.
Maybe just start your Subject with "VO 2.8" etc. It might already help putting us in the correct frame of mind.
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Setting a Path using variables.
Johan,
I agree with Jeff: there is no need for a VO Prefix for a message subject when that message is posted in the VO forum.
Robert
I agree with Jeff: there is no need for a VO Prefix for a message subject when that message is posted in the VO forum.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Setting a Path using variables.
Hi Robert,
Point taken, sorry just sometimes due to speed trying to answer, one loose track of the Forum the message is posted in. It is a bit of spaghetti postings, compared to NNTP formatting...robert wrote:Johan,
I agree with Jeff: there is no need for a VO Prefix for a message subject when that message is posted in the VO forum.
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Setting a Path using variables.
Nevertheless, Jeff, you might get better support if your questions are complete... Especially, you can't expect anyone to connect a "case" over different topics.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)