Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 17th, 2006, 5:49 AM   #1
JoeAvery
Newbie
 
Join Date: Jan 2006
Posts: 1
Rep Power: 0 JoeAvery is on a distinguished road
Decimal conventions

Hello,

I am working on a stock market analysis application with Deplhi 5 and I run into a problem with decimal conventions specified in Regional Settings. Normally, ASCII text stock data historical files have the following format:

Date,Open,HIgh,Low,Close,Volume (ex. 20060117, 40.05, 41.67, 39.58, 41.25, 234876)

When I try to manipulate (read, convert, etc.) those files and the Regional Settings are set to European conventions with the decimal being a comma, I get an error in my program "40.05 is not a valid floating point number".

Is there a way to deal with the regional settings in Delphi 5 so that decimal conventions are appropriately handled by the program?

Thanks in advance

Joe
JoeAvery is offline   Reply With Quote
Old Jan 18th, 2006, 3:43 PM   #2
Carl
Newbie
 
Join Date: Sep 2004
Location: Chelmsford, Essex, UK
Posts: 28
Rep Power: 0 Carl is on a distinguished road
Send a message via MSN to Carl
Joe

It's very hard to say without more details. How are you reading in the data? What function are you using to convert the strings to floats (there are numerous).

If you give some more details I'm sure someone will be able to advise.

Carl
__________________
Software developer since 1982, started on a ZX81.
Been developing in Delphi since 1998.
Currently trying to get my head round C++.
Carl is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC