| Online Eiffel Documentation

EiffelStudio

# New function layout

When clicking Function, the dialog changes to the function layout. It has the following components:

- Feature clause selection
- Feature name field
- Argument list
- Type selection
- Header comment field
- Precondition field
- Local variable field
- Selection for: normal, once, deferred or external routine
- Postcondition field

## Example

    class
    	PRODUCT

    feature -- Status report

    	order_price (quantity: INTEGER): DOUBLE is
    			-- Total price when ordering `quantity'.
    		require
    			quantity_non_negative: quantity >= 0
    		do
    			Result := quantity * price
    		ensure
    			correct: Result = quantity * price
    		end

    end -- class PRODUCT