﻿

# Comparison Functions

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Programming VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Comparison functions to compare Boolean values, strings, numeric values, arrays, and clusters.

The Comparison functions treat Boolean, string, numeric, array, and cluster values differently. You also can use the Comparison functions to compare characters. You can change the comparison mode of some Comparison functions.

Palette ObjectDescription
ComparisonCompares input items you specify to determine whether values are equal, greater than, less than, and so on.
Decimal Digit?Returns TRUE if char represents a decimal digit ranging from 0 through 9. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character. If char is a floating-point number, this function rounds to the nearest integer. Otherwise, this function returns FALSE.
Empty Array?Returns TRUE if the input array is empty. Otherwise, this function returns FALSE.
Empty String/Path?Returns TRUE if string/path is an empty string or an empty path. Otherwise, this function returns FALSE.
Equal To 0?Returns TRUE if x is equal to 0. Otherwise, this function returns FALSE.
Equal?Returns TRUE if x is equal to y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Fixed-Point Overflow?Returns TRUE if FXP includes an overflow status and FXP is the result of an operation that overflowed. Otherwise, this function returns FALSE.
Greater Or Equal To 0?Returns TRUE if x is greater than or equal to 0. Otherwise, this function returns FALSE.
Greater Or Equal?Returns TRUE if x is greater than or equal to y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Greater Than 0?Returns TRUE if x is greater than 0. Otherwise, this function returns FALSE.
Greater?Returns TRUE if x is greater than y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Hex Digit?Returns TRUE if char represents a hex digit ranging from 0 through 9, A through F, or a through f. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character. If char is a floating-point number, this function rounds to the nearest integer. Otherwise, this function returns FALSE.
In Range and CoerceDetermines whether x falls within a range specified by the upper limit and lower limit inputs and optionally coerces the value to fall within the range. The function performs the coercion only in Compare Elements mode. This function accepts time stamp values if all inputs are time stamp values. You can change the comparison mode of this function.
Less Or Equal To 0?Returns TRUE if x is less than or equal to 0. Otherwise, this function returns FALSE.
Less Or Equal?Returns TRUE if x is less than or equal to y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Less Than 0?Returns TRUE if x is less than 0. Otherwise, this function returns FALSE.
Less?Returns TRUE if x is less than y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Lexical ClassReturns the class number for char. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character.
Max & MinCompares x and y and returns the larger value at the top output terminal and the smaller value at the bottom output terminal. This function accepts time stamp values if all inputs are time stamp values. If the inputs are time stamp values, the function returns the later time at the top and the earlier time at the bottom. You can change the comparison mode of this function.
Not A Number/Path/Refnum?Returns TRUE if number/path/refnum is not a number (NaN), <Not a Path>, or not a refnum. Otherwise, this function returns FALSE.
Not Equal To 0?Returns TRUE if x is not equal to 0. Otherwise, this function returns FALSE.
Not Equal?Returns TRUE if x is not equal to y. Otherwise, this function returns FALSE. You can change the comparison mode of this function.
Octal Digit?Returns TRUE if char represents an octal digit ranging from 0 through 7. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character. If char is a floating-point number, this function rounds to the nearest integer. Otherwise, this function returns FALSE.
Printable?Returns TRUE if char represents a printable ASCII character. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character. If char is a floating-point number, this function rounds to the nearest integer. Otherwise, this function returns FALSE.
SelectReturns the value wired to the t input or f input, depending on the value of s. If s is TRUE, this function returns the value wired to t. If s is FALSE, this function returns the value wired to f.
White Space?Returns TRUE if char represents a white space character, such as Space, Tab, Newline, Carriage Return, Form Feed, or Vertical Tab. If char is a string, this function uses the first character in the string. If char is a number, this function interprets it as the ASCII value of a character. If char is a floating-point number, this function rounds to the nearest integer. Otherwise, the function returns FALSE.