c ternary operator
condition ? value_if_true : value_if_false
c ternary operator
condition ? value_if_true : value_if_false
how to use ternary operator in c programming
int a = 10, b = 20, c;
c = (a < b) ? a : b;
printf("%d", c);
ternary operator
if ($scope.SearchSalesOrderAndCompanyName !== undefined && $scope.SearchSalesOrderAndCompanyName != null ) {
SearchCriteria += " AND [SalesOrderNo] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%' OR ([SO].[CompanyNameOnBill] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%')";
}
if ($scope.FromDate !== undefined && $scope.FromDate !=null) {
SearchCriteria += " AND [SO].[SalesOrderDate] LIKE '%" + $scope.FromDate + "%'";
}
C Ternary Operator
Condition ? expression-if-true ; expression-if-false
//Here, '?' and ':' are Ternary Operators
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us