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
- Is Your Organization Aware of These 6 Key Public Cloud Risks?
- VPNs vs Proxies: What's Best for Business
- Insider Threat Awareness: Avoiding Internal Security Breaches
- 3 Amazing Examples of Artificial Intelligence in Action