F# – Decision-Making

  • Post author:
  • Post category:F#
  • Post comments:1 Comment
F# - Decision-Making

F# Decision-Making structures require that the programmer specify one or more conditions to be evaluated or tested by the program.

Following is the general form of a typical decision-making structure found in most of the programming languages āˆ’

F# - Decision-Making

F# programming language provides the following types of decision-making statements.

Sr.NoStatement & Description
1if /then statement (AnĀ if/then statementĀ consists of a Boolean expression followed by one or more statements).
2if/then/ else statement (AnĀ if/then statementĀ can be followed by an optionalĀ else statement,Ā which executes when the Boolean expression is false).
3if/then/elif/else statement (AnĀ if/then/elif/elseĀ statement allows you to have multiple else branches).
4nested if statements (You can use oneĀ ifĀ orĀ else ifĀ statement inside anotherĀ ifĀ orĀ else ifĀ statement(s)).

Next Topic – Click Here

This Post Has One Comment

Leave a Reply