Jump to content
Developer Wiki and Function Reference Links ×

Delimiters? Different by Language/County?


Recommended Posts

I think my archive might have gotten too big, because I am sure this has been discussed before, but I can't find it.

 

The basic question is:  How can you right a script that will run anywhere if it depends on how things are delimited.

 

In the US we use a period (.) as the decimal point. In many other countries it is a comma (,).

 

In the US we use a comma (,) as the separator in a CSV file, in Europe it is a semicolon (;)

 

I am considering a script that will read the formula out of a worksheet cell [=record.field format] and then I want to be able to extract the record name and field name. I can do that relatively easily using Copy, Pos, and SubString, but only if I am certain what the delimiter character between the two parts of the field are. Is it always a period? Or is it a comma in some languages/countries?

 

Since I think this is actually based on the operating system settings, it is not even a easy as having different versions for different countries as someone could set their OS up differently.

 

How do I determine what delimiters are used or how do I write a script that is delimiter independent?

 

I think I was bitten by this in the last couple of weeks where a script I posted had to have the commas changed to semicolons but I can't find that thread either.  Grrrrr.

 

OK Gurus what am I missing to make this work?

 

Link to comment
3 hours ago, Pat Stanford said:

I think I was bitten by this in the last couple of weeks where a script I posted had to have the commas changed to semicolons but I can't find that thread either.  Grrrrr.

 

Was the script you posted in my thread “insert values referred to Working Plane in a Worksheet”

I am under the impression that if you send a .vwx file containing the script the separators are always correct. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...