If Expression
Advertisement
Techopedia Explains If Expression
The if statement is used with an else statement when coding. Code is directed with the else statement depending on whether the if statement holds true. In the example below, a manager will add a bonus of 5 percent to all employee salaries except those in the advertising department. Those employees will get a bonus of 8 percent added to their salary. The code for this looks like the following: If {Employee.Dept} = "Advertisement" Then {Employee.Salary} * 0.08 Else {Employee.Salary} * 0.05Advertisement
Related Reading
- Computer Programming for the People?
- INFOGRAPHIC: The History of Programming Languages
- Single-Tenant vs. Multi-Tenant Applications: How to Choose
- Multimodal Learning: A New Frontier in Artificial Intelligence
- Uncovering Security Breaches
- 10 Big Data Do's and Don'ts