Admin Production ni-theme
Current Publication

Standard Language Additions

LabWindows/CVI

Standard Language Additions

LabWindows/CVI supports variable argument functions using the ANSI C macros, with one exception: none of the unspecified arguments can have a struct type. Therefore, never use the macro va_arg (ap, type) when type is a structure.

Note   LabWindows/CVI does not warn you about this error.

The native locale, which is specified by the empty string, "", is also the C locale. The following table shows the locale information values for the C locale.

C Locale Information Values

Name Type C Locale Value Description
decimal_point char * "." Decimal point character for non-monetary values
thousands_sep char * "" Non-monetary digit group separator character or characters
grouping char * "" Non-monetary digit groupings
int_curr_symbol char * "" Three-character international currency symbol, plus the character to separate the international symbol from the monetary quantity
currency_symbol char * "" Local currency symbol for the current locale
mon_decimal_point char * "" Decimal point character for monetary values
mon_thousands_sep char * "" Monetary digit group separator character or characters
mon_grouping char * "" Monetary digit groupings
positive_sign char * "" Sign character or characters for non-negative monetary quantities
negative_sign char * "" Sign character or characters for negative monetary quantities
int_frac_digits char CHAR_MAX Digits appear to the right of the decimal point for international monetary formats
frac_digits char CHAR_MAX Digits appear to the right of the decimal point for formats other than international monetary formats
p_cs_precedes char CHAR_MAX 1 if currency_symbol precedes non-negative monetary values; 0 if currency_symbol follows
p_sep_by_space char CHAR_MAX 1 if a space separates currency_symbol from non-negative monetary values; 0 otherwise
n_cs_precedes char CHAR_MAX Like p_cs_precedes, for negative values
n_sep_by_space char CHAR_MAX Like p_sep_by_space, for negative values
p_sign_posn char CHAR_MAX Positioning of positive_sign for a non-negative monetary quantity, then its currency_symbol
n_sign_posn char CHAR_MAX Positioning of negative_sign for a negative monetary quantity, then its currency_symbol

LabWindows/CVI implements the default locale by using the appropriate system settings. You can access the system settings by using the Regional Settings applet in the Control Panel. Anything not mentioned in this section behaves the same way under the default locale as it behaves in the C locale.

For the LC_NUMERIC locale, the following points are true:

  • decimal_point maps to the value of sDecimal.
  • thousands_sep maps to the value of sThousand.

For the LC_MONETARY locale, the following points are true:

  • currency_symbol maps to the value of sCurrency.
  • mon_decimal_point maps to the value of sDecimal.
  • mon_thousands_sep maps to the value of sThousand.
  • frac_digits maps to the value of iCurrDigits.
  • int_frac_digits maps to the value of iCurrDigits.
  • LabWindows/CVI sets p_cs_precedes and n_cs_precedes to 1 if iCurrency equals 0 or 2; otherwise LabWindows/CVI sets p_cs_precedes and n_cs_precedes to 0.
  • LabWindows/CVI sets p_sep_by_space and n_sep_by_space to 0 if iCurrency equals 0 or 1; otherwise, LabWindows/CVI sets p_sep_by_space and n_sep_by_space to 0.
  • iNegCurr determines the value of p_sign_posn and n_sign_posn as shown in the following table:
Value of iNegCurr Value of p_sign_posn
        and n_sign_posn
0, 4 0
1, 5, 8, 9 1
3, 7, 10 2
6 3
2 4

For the LC_CTYPE locale, the following points are true:

  • isalnum maps to the Windows isCharAlphaNumeric function.
  • isalpha maps to the Windows isCharAlpha function.
  • islower maps to the Windows isCharLower function.
  • isupper maps to the Windows isCharUpper function.
  • tolower maps to the Windows AnsiLower function.
  • toupper maps to the Windows AnsiUpper function.

For the LC_TIME locale, the following points are true:

  • strftime uses the following items from the win.ini file for the appropriate format specifiers: sTime, iTime, s1159, s2359, iTLZero, sShortDate, and sLongDate.
  • The names of the weekdays and the names of the months match the language version of LabWindows/CVI.

For the LC_COLLATE locale, strcoll maps to the Windows lstrcmp function.