Decimal separator

Q&A for Visual Basic, Visual Basic .NET, and PowerBasic developers using DPlot

Moderator: DPlotAdmin

Post Reply
guibson
Posts: 54
Joined: Wed Mar 10, 2004 9:20 pm

Decimal separator

Post by guibson »

Hi

We're using Dplot Jr with one of our application and we are experiencing the following problem, some of the computers where the soft. has been installed are having comma (,) instead of a dot (.) as decimal separator.

For our soft. it's OK but when we send commands to DPlot the an error occur because DPlot is confused between paramaters and our values due to fact that comma is used for parameter delimiter.

Is there anything that we can do about this except the fact to change the regional setting trough Windows API.

We don't like this way because for sure it fix our problem but it can create somes in other software

Thank you
________
Vaporgenie Vaporizer
Last edited by guibson on Fri Feb 11, 2011 10:51 pm, edited 1 time in total.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

My guess is you're using VB's Format(...) function to convert numbers to character strings and then inserting those character strings into a DPlot_Command command string - right? I wasn't aware until your question that VB used the international settings for the Format function - I've learned something new here.

If this is what you're doing, you'll need to instead use Str$ instead of Format. Str$ will always use "." for the decimal point regardless of Control Panel settings.

I may eventually check the end user's International settings for decimal and list separators, but... maybe not. I can see how doing so might cause more problems than it solves.
Visualize Your Data
support@dplot.com
guibson
Posts: 54
Joined: Wed Mar 10, 2004 9:20 pm

Decimal separator

Post by guibson »

Thank you

using the Str function solves all our problem related to this point.
________
Ecom
Post Reply