- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the link, David. It confirms what I suspected.
NLS is too awkward, so have written my own formatting routines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page