1. Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 13, 2006
- 488 views
- Last edited Apr 14, 2006
Hello again, I decided to go with the following forms: C:\mydir\myfile for single paths, and ;c:\mydir\myfile;;d:\mydir\myfile; for multiple paths so that the semicolons "surround" the paths. ...at least for now :) Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
2. Re: Path separators...final
- Posted by Brian Broker <brian_broker at yahoo.com> Apr 14, 2006
- 470 views
Al Getz wrote: > > Hello again, > > I decided to go with the following forms: > > C:\mydir\myfile > > for single paths, and > > ;c:\mydir\myfile;;d:\mydir\myfile; > > for multiple paths > so that the semicolons "surround" the paths. > > ...at least for now :) > > > Al Wouldn't it be more "natural" to "surround" the paths with "quotes" since that's how the command-line works? It's your call but I guess I'm just interested as to why you didn't comment on my idea. Can a quote be part of a Linux path? -- Brian
3. Re: Path separators...final
- Posted by Brian Broker <brian_broker at yahoo.com> Apr 14, 2006
- 489 views
Brian Broker wrote: > > Al Getz wrote: > > > > Hello again, > > > > I decided to go with the following forms: > > > > C:\mydir\myfile > > > > for single paths, and > > > > ;c:\mydir\myfile;;d:\mydir\myfile; > > > > for multiple paths > > so that the semicolons "surround" the paths. > > > > ...at least for now :) > > > > > > Al > > Wouldn't it be more "natural" to "surround" the paths with "quotes" since > that's > how the command-line works? It's your call but I guess I'm just interested > as to why you didn't comment on my idea. > > Can a quote be part of a Linux path? > > -- Brian PS: does that solution handle a path named "c:\my;;;dir;;\myfile;;d;"? i.e. --> ;c:\my;;;dir;;\myfile;;d;;;d:\mydir\myfile;
4. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 14, 2006
- 454 views
Brian Broker wrote: >Wouldn't it be more "natural" to "surround" the paths with "quotes" since >that's >how the command-line works? It's your call but I guess I'm just interested >as to why you didn't comment on my idea. > >Can a quote be part of a Linux path? > >-- Brian > > Brian Broker wrote: > > > Wouldn't it be more "natural" to "surround" the paths with "quotes" since > that's > how the command-line works? It's your call but I guess I'm just interested > as to why you didn't comment on my idea. > > Can a quote be part of a Linux path? > > -- Brian > > PS: does that solution handle a path named "c:\my;;;dir;;\myfile;;d;"? > > i.e. --> ;c:\my;;;dir;;\myfile;;d;;;d:\mydir\myfile; Hi there Brian, Sorry about that, i meant to comment on your post... About the quotes: Im afraid we'll need quotes to surround paths that contain spaces, so that might end up looking like: ""c:\mydir\My File With Some Spaces.txt"" But now that you mention it, maybe that would be ok too. Does using the semicolon allow using semicolons in the path as in your example? No, that's the drawback. On the other hand, semicolons are used in the Environment var PATH to separate paths, so i assumed this would work, but who knows how a user might name his folder or file right... MyFile;This;That;.txt maybe. Im going to have to consider using double quotes after reading your post again. I think this would be a better idea too now. Nice thing is, i already have the program set up to parse with a constant delimiter char, so all i have to do now is change one line: constant DELIMCHAR='"' instead of the semicolon ';' . Yeah, this sounds good :) Thanks. Probably even looks more natural to a person that doesnt do any programming (another nice thing i like to see). Now to see if my file saver/reader will easily save and read back the double quotes without any problem. If not i'll have to update that i guess. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
5. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 14, 2006
- 478 views
Al Getz wrote: > > Brian Broker wrote: > > >Wouldn't it be more "natural" to "surround" the paths with "quotes" since > >that's > >how the command-line works? It's your call but I guess I'm just interested > >as to why you didn't comment on my idea. > > > >Can a quote be part of a Linux path? > > > >-- Brian > > > > > Brian Broker wrote: > > > > > > Wouldn't it be more "natural" to "surround" the paths with "quotes" since > > that's > > how the command-line works? It's your call but I guess I'm just interested > > as to why you didn't comment on my idea. > > > > Can a quote be part of a Linux path? > > > > -- Brian > > > > PS: does that solution handle a path named "c:\my;;;dir;;\myfile;;d;"? > > > > i.e. --> ;c:\my;;;dir;;\myfile;;d;;;d:\mydir\myfile; > > Hi there Brian, > > > Sorry about that, i meant to comment on your post... > > About the quotes: > Im afraid we'll need quotes to surround paths that contain spaces, > so that might end up looking like: > ""c:\mydir\My File With Some Spaces.txt"" > > But now that you mention it, maybe that would be ok too. > > Does using the semicolon allow using semicolons in the path as > in your example? No, that's the drawback. On the other hand, > semicolons are used in the Environment var PATH to separate paths, > so i assumed this would work, but who knows how a user might > name his folder or file right... MyFile;This;That;.txt maybe. > > Im going to have to consider using double quotes after reading > your post again. I think this would be a better idea too now. > Nice thing is, i already have the program set up to parse with > a constant delimiter char, so all i have to do now is change one > line: > constant DELIMCHAR='"' > instead of the semicolon ';' . > > Yeah, this sounds good :) Thanks. > Probably even looks more natural to a person that doesnt do > any programming (another nice thing i like to see). > > Now to see if my file saver/reader will easily save and read > back the double quotes without any problem. If not i'll have > to update that i guess. > > > Al > > > My bumper sticker: "I brake for LED's" > > From "Black Knight": > "I can live with losing the good fight, > but i can not live without fighting it". > "Well on second thought, maybe not." Hi again, Interesting, i had anticipated the use of double quotes for paths with space chars, so i had previously added a short routine to convert the double quotes to escape+doublequote combos, so that Eu's 'get()' can read back a file saved like this. This is interesting because if that isnt done 'get' cant read back the file. 'print' doesnt work does it? Nor 'pretty_print'? Also doesnt double backslashes or did i miss something? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
6. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 14, 2006
- 460 views
Hello Al, Could you use the accent? Check the path for accents. If there are no accents then go ahead on. elsif there are accents then check path for a star. If there are no stars then replace all accents with stars. Put the accents in as delimiters. Do your business then replace stars with accents. elsif there are stars then check for ampersands, ats, tiltas, etc until you find a symbal that's not there. Then continue as with the star above. Just a thought . Maybe too much work. Don Cole
7. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 14, 2006
- 464 views
don cole wrote: > > Hello Al, > > Could you use the accent? > Check the path for accents. > If there are no accents then > go ahead on. > elsif there are accents then > check path for a star. > If there are no stars then > replace all accents with stars. > Put the accents in as delimiters. > Do your business then replace stars with accents. > elsif there are stars then > check for ampersands, ats, tiltas, etc until you find a symbal > that's not there. Then continue as with the star above. > > Just a thought . Maybe too much work. > > > Don Cole Hi there Don, I like the sound of your idea, but until we can say go/nogo i think we have to put your idea into a more concise form... I'll start and then you finish it ok? we start with a line of text, not a path (change this line if you like): c:\mydir\my file.exe (puts accents, stars, whatever you like in) Now start the routine: if AccentsFound then --do this else --do this instead end if Feel free to use pseudo function names like "AccentsFound", "StarsFound", etc., but keep the if/then/else statements concise ok? Thanks :) I'll be able to understand your idea better like this. Thanks again. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
8. Re: Path separators...final
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 15, 2006
- 476 views
Here is another possibility ...
sequence vPossibleDelims vPossibleDelims = ";,`'<>|=+" -- Separates a delimited set of paths into a sequence of paths. function SplitPaths(sequence pPathList) sequence lPathSet integer lDelim integer lPosn -- Split up the old list into separate paths lPathSet = "" if length(pPathList) > 0 then lDelim = pPathList[1] pPathList = pPathList[2..$] lPosn = find(lDelim, pPathList) while lPosn != 0 do lPathSet = append(lPathSet, pPathList[1..lPosn-1]) pPathList = pPathList[lPosn+1 .. $] lPosn = find(lDelim, pPathList) end while end if return lPathSet end function function AddPath(sequence pPathList, sequence pNewPath) sequence lPathSet integer lDelim integer lPosn -- Split up the old list into separate paths lPathSet = SplitPaths(pPathList) lPathSet = append(lPathSet, pNewPath) -- Find new delimiter, one that isn't in any of the paths. for i = 1 to length(vPossibleDelims) do lDelim = vPossibleDelims[i] for j = 1 to length(lPathSet) do lPosn = find(lDelim, lPathSet[j]) if lPosn != 0 then exit end if end for if lPosn = 0 then exit end if end for -- Reconstruct list using new delimiter. -- Format is <delim>(<path><delim>)... -- That is, list always starts and ends with the delimiter, -- and the delimiter is not in any of the paths. pPathList = "" for i = 1 to length(lPathSet) do pPathList &= lDelim pPathList &= lPathSet[i] end for pPathList &= lDelim return pPathList end function sequence test if find("UNITTEST:AddPath", command_line()) then test = AddPath("", "c:\\temp\\file.exw") test = AddPath(test, "Another file") test = AddPath(test, "funny,name") test = AddPath(test, "f`u n; y,name") printf(1, "%s\n", {test}) test = SplitPaths(test) for i = 1 to length(test) do printf(1, "%s\n", {test[i]}) end for end if
-- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
9. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 15, 2006
- 481 views
Hello Al, sorry it took so long.\ I had to go back to you original post on this and reread it. This is what I came up with.
constant symbal={"`","*","~","@","&"}
if findAccent then for x=2 to length(symbal) do tt=testForSymbal[x] if tt=0 then newPath[1]= symbal[x] & replaceAccentsWithSymbal(x) & symbal[x] newPath[2]= symbal[x] exit end if else newPath[1]="`" & line & "`" newPath[2]=symbal[1] end for end if
Don Cole }}}
10. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 15, 2006
- 464 views
don cole wrote: > > Hello Al, sorry it took so long.\ > > I had to go back to you original post on this and reread it. > > This is what I came up with. > > }}} <eucode> > > > constant symbal={"`","*","~","@","&"} > > if findAccent then > for x=2 to length(symbal) do > tt=testForSymbal[x] > if tt=0 then > newPath[1]= symbal[x] & replaceAccentsWithSymbal(x) & symbal[x] > newPath[2]= symbal[x] > exit > end if > else > newPath[1]="`" & line & "`" > newPath[2]=symbal[1] > end for > end if > > Don Cole Don Cole
11. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 476 views
Derek Parnell wrote: > > Here is another possibility ... > > }}} <eucode> > sequence vPossibleDelims > vPossibleDelims = ";,`'<>|=+" > > -- Separates a delimited set of paths into a sequence of paths. > function SplitPaths(sequence pPathList) > sequence lPathSet > integer lDelim > integer lPosn > > -- Split up the old list into separate paths > lPathSet = "" > if length(pPathList) > 0 then > lDelim = pPathList[1] > pPathList = pPathList[2..$] > lPosn = find(lDelim, pPathList) > while lPosn != 0 do > lPathSet = append(lPathSet, pPathList[1..lPosn-1]) > pPathList = pPathList[lPosn+1 .. $] > lPosn = find(lDelim, pPathList) > end while > end if > return lPathSet > end function > > function AddPath(sequence pPathList, sequence pNewPath) > sequence lPathSet > integer lDelim > integer lPosn > > -- Split up the old list into separate paths > lPathSet = SplitPaths(pPathList) > lPathSet = append(lPathSet, pNewPath) > > -- Find new delimiter, one that isn't in any of the paths. > for i = 1 to length(vPossibleDelims) do > lDelim = vPossibleDelims[i] > for j = 1 to length(lPathSet) do > lPosn = find(lDelim, lPathSet[j]) > if lPosn != 0 then > exit > end if > end for > if lPosn = 0 then > exit > end if > end for > > -- Reconstruct list using new delimiter. > -- Format is <delim>(<path><delim>)... > -- That is, list always starts and ends with the delimiter, > -- and the delimiter is not in any of the paths. > pPathList = "" > for i = 1 to length(lPathSet) do > pPathList &= lDelim > pPathList &= lPathSet[i] > end for > pPathList &= lDelim > > return pPathList > end function > > > sequence test > if find("UNITTEST:AddPath", command_line()) then > test = AddPath("", "c:\\temp\\file.exw") > test = AddPath(test, "Another file") > test = AddPath(test, "funny,name") > test = AddPath(test, "f`u n; y,name") > > > printf(1, "%s\n", {test}) > test = SplitPaths(test) > for i = 1 to length(test) do > printf(1, "%s\n", {test[i]}) > end for > end if > </eucode> {{{ > > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Hi Derek, Would it be possible for you to describe what you are trying to achieve here (and how you're trying to achieve it), or should i just run the code and see how it works? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
12. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 462 views
don cole wrote: > > Hello Al, sorry it took so long.\ > > I had to go back to you original post on this and reread it. > > This is what I came up with. > > }}} <eucode> > > > constant symbal={"`","*","~","@","&"} > > if findAccent then > for x=2 to length(symbal) do > tt=testForSymbal[x] > if tt=0 then > newPath[1]= symbal[x] & replaceAccentsWithSymbal(x) & symbal[x] > newPath[2]= symbal[x] > exit > end if > else > newPath[1]="`" & line & "`" > newPath[2]=symbal[1] > end for > end if > > Don Cole Hi there Don, I 'think' i know what you are saying now, but one question i have is...how do you know which 'accents' to replace, for example in this line: 'c:\mydir\my'file.exe' I thought about using the first char (ie the ' here) as delimiter, which would allow different delims for different lines too, but i want the UI to accept the non-delimiter form too like this: c:\mydir\my'file.exe where there is only one path entered by the user. Here's a strange but valid possibility for the line: "c:\my dir\my file.exe" -'a'-'b'-'c' The delimiter form im using right now (just for now) is this: ;"c:\my dir\my file.exe" -'a'-'b'-'c'; where there is a semi before and after the entire line, so that the user can enter two paths: ;mypath1 -args;;mypath2 -args; Also thought about Þmypath1Þmypath2Þ --see how this shows up on EuForum :) but dont want to force the user to have to use ALT-Numb codes. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
13. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 15, 2006
- 473 views
Hello Al, To start with I made a mistake. It should have been:
constant symbal={"`","*","~","@","&"} ------------this would be a function returing newPath sequence newPath newPath=repeat({},2)
if findAccent then for x=2 to length(symbal) do tt=testForSymbal[x] if tt=0 then newPath[1]= "`" & replaceAccentsWithSymbal(x) & "`" newPath[2]= symbal[x]this is the symbal used to replace the non
I 'think' i know what you are saying now, but one question i
have is...how do you know which 'accents' to replace, for example
in this line:
'c:\mydir\my'file.exe' How did the two end accents get in there at this point?
I thought about using the first char (ie the ' here) as delimiter,
which would allow different delims for different lines too, but
i want the UI to accept the non-delimiter form too like this:
c:\mydir\my'file.exe
This would come out 'c:\mydir\my*file.exe'
Don Cole }}}
14. Re: Path separators...final
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 15, 2006
- 449 views
Al Getz wrote: > > Derek Parnell wrote: > > > > Here is another possibility ... > Hi Derek, > > > Would it be possible for you to describe what you are trying to > achieve here (and how you're trying to achieve it), The list of paths would begin and end with the delimiter, and the delimiter would exist inbetween each path in the list. The delimiter would not be any character in any of the paths. The delimiter would be chosen from the list ;,`'<>|=+ Using this method, you just need to look at the first character to know what the delimiter is and then pick out the paths from the list. Adding a new path would just reexamine all the paths for one of the allowable delimiters that doesn't exist in an of the existing or new path. > or should i > just run the code and see how it works? Yes. Read the code first to understand it. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
15. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 458 views
don cole wrote: > > Hello Al, > > To start with I made a mistake. > It should have been: > > }}} <eucode> > constant symbal={"`","*","~","@","&"} > ------------this would be a function returing newPath > sequence newPath > newPath=repeat({},2) > > if findAccent then > for x=2 to length(symbal) do > tt=testForSymbal[x] > if tt=0 then > newPath[1]= "`" & replaceAccentsWithSymbal(x) & "`" > newPath[2]= symbal[x]--this is the symbal used to replace the non > --delimiter accents > --it will be used to replace non delimiter > --accents later on > exit > end if > end for > else > newPath[1]="`" & line & "`" > newPath[2]=0--this is 0 because no accents were replacedend > end if > > > > I 'think' i know what you are saying now, but one question i > > have is...how do you know which 'accents' to replace, for example > > in this line: > > > > 'c:\mydir\my'file.exe' > How did the two end accents get in there at this point? > > > > I thought about using the first char (ie the ' here) as delimiter, > > which would allow different delims for different lines too, but > > i want the UI to accept the non-delimiter form too like this: > > > > c:\mydir\my'file.exe > > This would come out 'c:\mydir\my*file.exe' > > > Don Cole Hi Don, The accents got in there because the user could have typed them going by the rule that they have to use a delimiter to separate paths, as in: 'c:\MyDir\My'File' 'd:\MyDir2\My'File2' which as you can see wont work because the program wont know which accent to end the path(s) on. Keep in mind we could also have this: 'c:\MyDir\My'File' -' 'd:\MyDir2\My'File2' -''' which would be strange, but still possible. What this means is that we have to parse the paths and any arguments to each path that may be present. I have other (future) plans to have the UI parse paths BEFORE any delimiters are needed (so the program can choose perhaps) but this part of the functionality will still remain intact...ie the user has the ability to enter the path typed as they see fit, with delimiters. Another possibility when there are spaces in the path: "c:\MyDir\My 'Other' File" -'a' Where does the user put the accents in this example, and when a second path (and arg) follows this one? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
16. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 449 views
Derek Parnell wrote: > > Al Getz wrote: > > > > Derek Parnell wrote: > > > > > > Here is another possibility ... > > > > Hi Derek, > > > > > > Would it be possible for you to describe what you are trying to > > achieve here (and how you're trying to achieve it), > > The list of paths would begin and end with the delimiter, and the delimiter > would exist inbetween each path in the list. The delimiter would not be any > character in any of the paths. The delimiter would be chosen from the list > > ;,`'<>|=+ > > Using this method, you just need to look at the first character to know what > the delimiter is and then pick out the paths from the list. Adding a new path > would just reexamine all the paths for one of the allowable delimiters that > doesn't exist in an of the existing or new path. > > > or should i > > just run the code and see how it works? > > Yes. Read the code first to understand it. > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Hi Derek, Well ok, but, i was saying in another post that i did want to allow the form: c:\MyDir\MyFile as well as: 'c:\MyDir\MyFile' so that the user has the choice to only type the path itself when only ONE path is filled in. You think this is compatible with your code? I'll try to run the code you presented last time too. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
17. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 475 views
Derek Parnell wrote: > > Al Getz wrote: > > > > Derek Parnell wrote: > > > > > > Here is another possibility ... > > > > Hi Derek, > > > > > > Would it be possible for you to describe what you are trying to > > achieve here (and how you're trying to achieve it), > > The list of paths would begin and end with the delimiter, and the delimiter > would exist inbetween each path in the list. The delimiter would not be any > character in any of the paths. The delimiter would be chosen from the list > > ;,`'<>|=+ > > Using this method, you just need to look at the first character to know what > the delimiter is and then pick out the paths from the list. Adding a new path > would just reexamine all the paths for one of the allowable delimiters that > doesn't exist in an of the existing or new path. > > > or should i > > just run the code and see how it works? > > Yes. Read the code first to understand it. > > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell Hi Derek, Ok i ran the code and here's what i got... 'c:\temp\file.exw'Another file'funny,name'f`u n; y,name' c:\temp\file.exw Another file funny,name f`u n; y,name which looks fine, but there's one more "catch" and that is the user must be able to type in the path(s) with delimiters so that they can separate the paths themselves, BEFORE the program gets to look at the whole line. Now we could add a function as your example "addpath()" but im not sure i want to do it that way because i'd have to supply another edit box for them to type in the path, which gets added to the list in the first edit box. This way the program could keep track of each path and change ALL the delimiters once all the paths are entered, and even change them again later if another path is added. This would work i agree, but i'd rather, at least for now, keep it down to one edit box (a long, single line for now). I know another way would be to supply a multiline edit box, so the user could type one path per line, and then parse that (which as im sure you know would be very simple) but then i'd have to supply four multiline edit boxes (for all the paths and args and open commands) and that gets a little large, unless i put them on a tab control, but then the user has to switch tabs to enter all the info. At least for now, i'd like to stick with one edit box and one line. Maybe later a drop down list? Then i'll use your AddPath() method for sure. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
18. Re: Path separators...final
- Posted by Bernie Ryan <xotron at bluefrog.com> Apr 15, 2006
- 476 views
Al: There are five program launchers in the archive. There have been 46 posts on euform about what path separator character you should use to write your program. Don't you think that this is over using the euform to help you determine how you to write a program ? Why not use private e-mail ? Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan
19. Re: Path separators...final
- Posted by Chris Burch <chriscrylex at aol.com> Apr 15, 2006
- 461 views
Bernie Ryan wrote: > > > Al: > > There are five program launchers in the archive. > > There have been 46 posts on euform about what path separator character > you should use to write your program. > > Don't you think that this is over using the euform to help you > determine how you to write a program ? No, its just another reason why a forum format makes more sense. Surely eu could do this, then people could choose whether they wanted the list format, or the forum format with the same dataset? > > Why not use private e-mail ? > > Bernie > > My files in archive: > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> http://members.aol.com/chriscrylex/euphoria.htm http://uboard.proboards32.com/ http://members.aol.com/chriscrylex/EUSQLite/eusql.html
20. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 15, 2006
- 449 views
- Last edited Apr 16, 2006
Al Getz wrote: > > don cole wrote: > > > > Hello Al, > > > > To start with I made a mistake. > > It should have been: > > > > }}} <eucode> > > constant symbal={"`","*","~","@","&"} > > ------------this would be a function returing newPath > > sequence newPath > > newPath=repeat({},2) > > > > if findAccent then > > for x=2 to length(symbal) do > > tt=testForSymbal[x] > > if tt=0 then > > newPath[1]= "`" & replaceAccentsWithSymbal(x) & "`" > > newPath[2]= symbal[x]--this is the symbal used to replace the > > non > > --delimiter accents > > --it will be used to replace non delimiter > > --accents later on > > exit > > end if > > end for > > else > > newPath[1]="`" & line & "`" > > newPath[2]=0--this is 0 because no accents were replacedend > > end if > > > > > > > I 'think' i know what you are saying now, but one question i > > > have is...how do you know which 'accents' to replace, for example > > > in this line: > > > > > > 'c:\mydir\my'file.exe' > > How did the two end accents get in there at this point? > > > > > > I thought about using the first char (ie the ' here) as delimiter, > > > which would allow different delims for different lines too, but > > > i want the UI to accept the non-delimiter form too like this: > > > > > > c:\mydir\my'file.exe > > > > This would come out 'c:\mydir\my*file.exe' > > > > > > Don Cole > > Hi Don, > > The accents got in there because the user could have typed them > going by the rule that they have to use a delimiter to separate > paths, as in: I thought the whole point if the exercize was to add the delimiters with the program. Why would the user type them in before hand? > > 'c:\MyDir\My'File' 'd:\MyDir2\My'File2' > > which as you can see wont work because the program wont know which > accent to end the path(s) on. > > Keep in mind we could also have this: > > 'c:\MyDir\My'File' -' 'd:\MyDir2\My'File2' -''' > > which would be strange, but still possible. > > What this means is that we have to parse the paths and any arguments > to each path that may be present. > > I have other (future) plans to have the UI parse paths BEFORE any > delimiters are needed (so the program can choose perhaps) but > this part of the functionality will still remain intact...ie the > user has the ability to enter the path typed as they see fit, > with delimiters. > > Another possibility when there are spaces in the path: > > "c:\MyDir\My 'Other' File" -'a' > > Where does the user put the accents in this example, and when a second > path (and arg) follows this one? > > > Al > > > My bumper sticker: "I brake for LED's" > > From "Black Knight": > "I can live with losing the good fight, > but i can not live without fighting it". > "Well on second thought, maybe not." Don Cole
21. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 468 views
- Last edited Apr 16, 2006
Bernie Ryan wrote: > > > Al: > > There are five program launchers in the archive. > > There have been 46 posts on euform about what path separator character > you should use to write your program. > > Don't you think that this is over using the euform to help you > determine how you to write a program ? > > Why not use private e-mail ? > > Bernie > > My files in archive: > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> Hi Bernie, Im just trying to find the best solution by asking the Eu community for their ideas, going by the fact that many people thinking about one problem usually come up with a better idea than just one person thinking about the one problem Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
22. Re: Path separators...final
- Posted by don cole <doncole at pacbell.net> Apr 15, 2006
- 457 views
- Last edited Apr 16, 2006
Bernie Ryan wrote: > > > Al: > > There are five program launchers in the archive. > > There have been 46 posts on euform about what path separator character > you should use to write your program. > > Don't you think that this is over using the euform to help you > determine how you to write a program ? > > Why not use private e-mail ? > > Bernie > > My files in archive: > WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API > > Can be downloaded here: > <a > href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a> Yeah Al, And that would give us more time to talk about the Deluxe Slide Show. Don Cole
23. Re: Path separators...final
- Posted by Al Getz <Xaxo at aol.com> Apr 15, 2006
- 467 views
- Last edited Apr 16, 2006
Don wrote: > > I previously wrote: > > Hi Don, > > > > The accents got in there because the user could have typed them > > going by the rule that they have to use a delimiter to separate > > paths... > > I thought the whole point of the exercize was to add the delimiters with the > program. Why would > the user type them in before hand? > > Don Cole Hello again Don, The user is given the option to type them in by hand (which BTW is the only way it can be done so far anyway) and because they can enter more than one path on one line we need something to delimit them. The whole thing comes out to parsing the following four things: 1. The line of paths with delimiters already present 2. The line of open commands with delims too 3. The line of arguments with delims 4. The line of working directories, also with delims Items 2,3, and 4 will come out the same as item 1 so im trying to find the best solution for item 1 first. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."