Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi - undeclared identifier: LOCALE_SYSTEM_DEFAULT

I'm trying to format a float (extended) by the system locale's default currency settings. I have found the key proponent to this solution to be the following line:

GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, format_settings);

and everywhere I look, they provide the solution exactly as shown (no class specifier before, like System.LOCALE_SYSTEM_DEFAULT or anything). However, my compiler is insistent that LOCALE_SYSTEM_DEFAULT is an undeclared identifier. It seems to me that the only requirement is to have "uses SysUtils", which I do.

I'm using Delphi 2010. Does anybody know why my compiler can't find this seemingly implicit constant?

Thanks in abundance,
Jared

like image 200
JMTyler Avatar asked Jan 18 '10 02:01

JMTyler


1 Answers

Add Windows to your uses list. That identifier is defined there.

like image 182
Allen Bauer Avatar answered Oct 06 '22 01:10

Allen Bauer