1. Ideas for path separator character

Hello there,

Im looking for ideas for a single character to use as a path separator.
The character shouldnt be anything that could be contained within a 
path (win or lin).
Problem is, every char you pick 'could' be contained in the
path at the end where the program arguments can be.  For example:

Using * as a separator char:

*c:\mydir\myfile.exe* *c:\otherdir\otherfile.exe*

These paths seem to be clearly defined as bewteen * chars.
Problem comes up if one day someone finds they need to use the * char
as argument to their program such as:
c:\mydir\file2.exe *
Now trying to put that within * chars looks like this:
*c:\mydir\file2.exe **
which is not clear to the program reading this line because it will
think the program path ends after the second * char.
Yes, maybe it can see that there is one more * but there are other
situations too, such as maybe the program needs two in a row as
argument to tell it to do something:
*c:\mydir\file2.exe **
Now it's impossible to tell what the 'user' intends.

Ok, having said that, maybe two in a row to indicate a literal * char,
but any other ideas out there?

Environments use semicolon to sep paths, but im wondering if there are
any programs out there that use a semi as a possible argument, or
are they always avoided because of this?


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."

new topic     » topic index » view message » categorize

2. Re: Ideas for path separator character

Al Getz wrote:
> 
> Hello there,
> 
> Im looking for ideas for a single character to use as a path separator.
> The character shouldnt be anything that could be contained within a 
> path (win or lin).

I would think that a comma or semicolon should do the trick.  Neither character
can be contained in a path...

-- Brian

new topic     » goto parent     » topic index » view message » categorize

3. Re: Ideas for path separator character

Brian Broker wrote:
> 
> Al Getz wrote:
> > 
> > Hello there,
> > 
> > Im looking for ideas for a single character to use as a path separator.
> > The character shouldnt be anything that could be contained within a 
> > path (win or lin).
> 
> I would think that a comma or semicolon should do the trick.  Neither
> character
> can be contained in a path...
> 
> -- Brian

Hi Brian,

I just tried it and Win Explorer accepts both comma and semicolon
as path characters.
Any other ideas?

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."

new topic     » goto parent     » topic index » view message » categorize

4. Re: Ideas for path separator character

Al Getz wrote:
> 
> Brian Broker wrote:
> > 
> > Al Getz wrote:
> > > 
> > > Hello there,
> > > 
> > > Im looking for ideas for a single character to use as a path separator.
> > > The character shouldnt be anything that could be contained within a 
> > > path (win or lin).
> > 
> > I would think that a comma or semicolon should do the trick.  Neither
> > character
> > can be contained in a path...
> > 
> > -- Brian
> 
> Hi Brian,
> 
> I just tried it and Win Explorer accepts both comma and semicolon
> as path characters.
> Any other ideas?
> 
> Al
> 

I didn't realize I could make a single directory like this:

mkdir "dir1,dir2"
   -or-
mkdir "dir1;dir2"

without quotes, they make 2 separate directories...

So why not use quotes?  Can you give an example of what you are trying to
implement?

-- Brian

new topic     » goto parent     » topic index » view message » categorize

5. Re: Ideas for path separator character

Hi Brian,


Im just trying to 'store' paths (with poss arguments) on a single
line similar to how it's done with environment 'PATH' variable.
Only difference is i'd like to avoid using a semicolon in case
someone wants to use that for an argument, although i wouldnt
use that myself for an argument.

Example:
C:\MyDir1\MyFile1.exe [args];C:\MyDir2\MyFile2 [args];
where here i've used a semicolon similar to what the PATH
variable accepts as a delimiter.


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."

new topic     » goto parent     » topic index » view message » categorize

6. Re: Ideas for path separator character

Hey Al,

How about the accent mark (`)?

Don Cole

new topic     » goto parent     » topic index » view message » categorize

7. Re: Ideas for path separator character

don cole wrote:
> 
> Hey Al,
> 
> How about the accent mark (`)?
> 
> Don Cole

Hi Don,

That's a good idea, but what if they already have that char in their
path?


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."

new topic     » goto parent     » topic index » view message » categorize

8. Re: Ideas for path separator character

From what I know, in linux you can have any character for the file
name (including ? and * and \) except / because it is used for dir
separator and nul (byte 0)

So if your string is not nul terminated, you can use that :)



> posted by: Al Getz <Xaxo at aol.com>

> Hello there,

> Im looking for ideas for a single character to use as a path separator.
> The character shouldnt be anything that could be contained within a 
> path (win or lin).
> Problem is, every char you pick 'could' be contained in the
> path at the end where the program arguments can be.  For example:

> Using * as a separator char:

> *c:\mydir\myfile.exe* *c:\otherdir\otherfile.exe*

> These paths seem to be clearly defined as bewteen * chars.
> Problem comes up if one day someone finds they need to use the * char
> as argument to their program such as:
> c:\mydir\file2.exe *
> Now trying to put that within * chars looks like this:
> *c:\mydir\file2.exe **
> which is not clear to the program reading this line because it will
> think the program path ends after the second * char.
> Yes, maybe it can see that there is one more * but there are other
> situations too, such as maybe the program needs two in a row as
> argument to tell it to do something:
> *c:\mydir\file2.exe **
> Now it's impossible to tell what the 'user' intends.

> Ok, having said that, maybe two in a row to indicate a literal * char,
> but any other ideas out there?

> Environments use semicolon to sep paths, but im wondering if there are
> any programs out there that use a semi as a possible argument, or
> are they always avoided because of this?


> 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."

new topic     » goto parent     » topic index » view message » categorize

9. Re: Ideas for path separator character

Hi

If I have a long string, which I want to join together, then break up again
later, I would use a (hopefully) uncommon string, eg {r1}, to signify the line
break.

Chris



http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

new topic     » goto parent     » topic index » view message » categorize

10. Re: Ideas for path separator character

Al Getz wrote:
> 
> Hello there,
> 
> Im looking for ideas for a single character to use as a path separator.
> The character shouldnt be anything that could be contained within a 
> path (win or lin).
> Problem is, every char you pick 'could' be contained in the
> path at the end where the program arguments can be.  

Pick something uncommon.  Windows normally uses a semi-colon, linux a colon.
I'd go with the semi-colon, since the colon is common in windows paths.  If
a user wants to use a semi-colon in a path (should be pretty rare) then 
document that they'll need to escape it by using two.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

11. Re: Ideas for path separator character

Matt Lewis wrote:
> 
> Al Getz wrote:
> > 
> > Hello there,
> > 
> > Im looking for ideas for a single character to use as a path separator.
> > The character shouldnt be anything that could be contained within a 
> > path (win or lin).
> > Problem is, every char you pick 'could' be contained in the
> > path at the end where the program arguments can be.  
> 
> Pick something uncommon.  Windows normally uses a semi-colon, linux a colon.
> I'd go with the semi-colon, since the colon is common in windows paths.  If
> a user wants to use a semi-colon in a path (should be pretty rare) then 
> document that they'll need to escape it by using two.
> 
> Matt Lewis

Hi Matt,


That sounds good.  I think i'll go with that.  I figued what the heck
too, because after all it's know that that is used in PATH env too.

Thanks, and thanks to everyone else who offered suggestions 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."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu