- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The NLS_LI Parameter List in the Intel FORTRAN Developer Guide includes settings I need for customized date, time and number formats. How do I invoke these in code or in Project Properties? Thx.
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I found this link:
Hope that's helpful.
Having worked across several locales with data files which could have been created with different formats, I found that it was important to be able to determine which locate the data file had been created in, rather than assuming that the current locale was correct. This got tricky when my app created data files which users could open as a CSV file in Excel, so getting the dividers and the decimal points correct was critical.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks, David. The next challenge is to discover which of the 100+ countries has the format I need. But even this will not help if IFORT does not act on them automatically. For instance, if the locale says "no leading zeros", but IFORT always does leading zeros, then I'll have to code a work-around.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi Mike,
My understanding is that you can format numbers, time and date using functions from the IFNLS library
See the examples at https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2023-1/nls-and-mcbs-routines-on-windows.html
My code was simpler, since I only needed to know the decimal point and separator characters.
Hope that points you in the right direction.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks for the link, David. It confirms what I suspected.
NLS is too awkward, so have written my own formatting routines.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I looked at NLS back in 2014 and gave up and did things a different way.... https://community.intel.com/t5/Intel-Fortran-Compiler/National-Language-Support-NLS-Usage-in-Ifort/m-p/953297#M92744%3Fwapkw=nls

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite