EXHIBIT 4.0 FIFTH AMENDMENT TO LETTER AGREEMENT ----------------------------------- THIS FIFTH AMENDMENT TO LETTER AGREEMENT (the "Amendment"), dated as of --------- June 30, 1998, is entered into by and between INTERNATIONAL HOUSE OF PANCAKES, INC. (the "Company"), IHOP CORP., (the "Guarantor") and BANK OF AMERICA NATIONAL ------- --------- TRUST AND SAVINGS ASSOCIATION (successor by merger to Bank of America Illinois) (the "Bank") and amends that certain Letter Agreement between the parties dated ---- as of June 30, 1993, as amended by a letter dated July 15, 1993 from Continental Bank to the Borrower, a First Amendment to Letter Agreement dated as of December 31, 1994, a Second Amendment to Letter Agreement dated as of March 11, 1996, a Third Amendment to Letter Agreement dated as of September 3, 1996, a Fourth Amendment to Letter Agreement dated as of November 1, 1996, and a letter from the Bank to the Company dated June 25, 1997 (this Letter Agreement as in effect as of the date of this Amendment is referred to as the "Credit Agreement"). ------ --------- RECITALS -------- A. The Company has requested that the Bank agree to certain amendments of the Credit Agreement. B. The Bank is willing to amend the Credit Agreement subject to the terms and conditions of this Amendment. NOW, THEREFORE, for valuable consideration, the receipt and adequacy of which are hereby acknowledged, the parties hereto hereby agree as follows: 1. Defined Terms. Unless otherwise defined herein, capitalized terms ------------- used herein shall have the meanings, if any, assigned to them in the Credit Agreement. 2. Amendments to Credit Agreement. ------------------------------ (a) Section 1 of the Credit Agreement is amended as follows: Section 1. Term of Agreement. So long as the Borrower is in ----------------- compliance with the terms of this letter agreement (the "Agreement"), the commitment of the Bank shall terminate on June 30, 2001 (the "Maturity Date"); provided, however, that any Letter of Credit issued hereunder shall have an expiry date not later than the earlier of one year after the date it is issued or the Maturity Date. Between April 1 and April 30 of each year, commencing April 1, 1994, the Borrower may request a one-year extension of the Maturity Date (either beyond the initial Maturity Date hereunder or beyond a Maturity Date as previously extended pursuant to the terms hereof). The decision whether to grant the requested extension of the Maturity Date may be made by the Bank in its sole and absolute discretion. All Letters of Credit and Loans shall be used for the Borrower's working capital and other general corporate purposes. 1 (b) Section 14.12(a) of the Credit Agreement is amended by deleting "$45,000,000" and inserting "$55,000,000" in lieu thereof. (c) The definition of "Eurodollar Rate" in Section 18 of the Credit Agreement is amended in its entirety to provide as follows: "Eurodollar Rate" means, for any Interest Period for any Eurodollar Rate Loan, an interest rate per annum equal at all times during such Interest Period to the sum of (i) 0.95% plus (ii) the rate of interest per annum at which dollar deposits in the approximate amount of the Bank's Eurodollar Rate Loan for such Interest Period would be offered by the Bank's Grand Cayman Branch, Grand Cayman, B.W.I. (or such other office as may be designated for such purpose by the Bank), to major banks in the offshore dollar interbank market upon request of such banks at approximately 11:00 a.m. (New York City time) two Business Days prior to the commencement of such Interest Period. 3. Reaffirmation of IHOP Guaranty. IHOP does hereby reaffirm that the ------------------------------ terms and provisions of Section 17 of the Credit Agreement continue in full force and effect and are ratified and confirmed in all respects on and as of the date hereof, after giving effect to this Amendment. 4. Representations and Warranties. IHOP and the Company hereby represent ------------------------------ and warrant to the Bank as follows: (a) Authority. Each of the Company and IHOP has been duly incorporated --------- and is a validly existing corporation under the laws of the State of Delaware, has full legal right, power and authority to enter into this Amendment and to carry out and consummate all transactions contemplated by the Credit Agreement and this Amendment. (b) Enforceability. This Amendment has been duly authorized and is a -------------- valid and binding obligation of the Company and IHOP, enforceable in accordance with its terms. (c) No Conflict. This Amendment will not conflict with or constitute ----------- a breach of or a default under their respective articles of incorporation or by- laws, or any material agreement to which the Company or IHOP is a party or by which the Company or IHOP or any of their respective properties are bound, or any rule or regulation of any court or governmental agency or body having jurisdiction over the Company or IHOP or any of their respective activities or properties. (d) No Event of Default. No Event of Default under the Credit Agreement ------------------- has occurred and is continuing. (e) Representations and Warranties. The representations and warranties in ------------------------------ Section 11 of the Credit Agreement are true and correct in all respects on and as of the date hereof as though made on and as of the date hereof. 5. Conditions, Effectiveness. The effectiveness of this Amendment shall ------------------------- be subject to: 2 (a) the compliance by the Company with its agreements herein contained; (b) the delivery to Bank of copies of this Amendment signed by the Company and IHOP and Guarantor Acknowledgement and Consent (in the form attached to this Amendment) executed by IHOP Restaurants, Inc.; IHOP Properties, Inc.; and IHOP Realty Corp; and (c) the delivery of such other evidence with respect to the Company, IHOP, and any other person as the Bank may reasonably request in connection with this Amendment and the compliance with the conditions set forth herein. 6. Miscellaneous. ------------- (a) Except as herein expressly amended, all terms, covenants and provisions of the Credit Agreement are and shall remain in full force and effect and all references therein to such Credit Agreement shall henceforth refer to the Credit Agreement as amended by this Amendment. This Amendment shall be deemed incorporated into, and a part of, the Credit Agreement. (b) This Amendment is specific in time and in intent and does not constitute, nor should it be construed as, a waiver of any other right, power, or privilege under the Credit Agreement, or under any agreement, contract, indenture, document or instrument mentioned in the Credit Agreement; nor does it preclude other or further exercise thereof or the exercise of any other right, power, or privilege, nor shall any waiver of any right, power, privilege or default under the Credit Agreement or under this Amendment, or under any agreement, contract, indenture, document or instrument mentioned in the Credit Agreement constitute a waiver of any other default of the same or of any other term or provision. (c) This Amendment is a contract made under and governed by the internal laws of the state of Illinois. (d) This Amendment may be executed in any number of counterparts, each of which shall be deemed an original, but all such counterparts together shall constitute but one and the same instrument. Each of the parties hereto understands and agrees that this document (and any other document required herein) may be delivered by any party thereto either in the form of an executed original or an executed original sent by facsimile transmission to be followed promptly by mailing of a hard copy original, and that receipt by the Bank of a facsimile transmitted document purportedly bearing the signature of the Company shall bind the Company with the same force and effect as the delivery of a hard copy original. Any failure by the Bank to receive the hard copy executed original of such document shall not diminish the binding effect of receipt of the facsimile transmitted executed original of such document which hard copy page was not received by the Bank. 3 IN WITNESS WHEREOF, each of the parties hereto has caused its respective duly authorized officer to execute and deliver this Amendment as of the date first written above. INTERNATIONAL HOUSE OF PANCAKES, INC. By: /s/ Richard K. Herzer ------------------------------------- Name: RICHARD K. HERZER Title: President IHOP CORP. By: /s/ Richard K. Herzer ------------------------------------- Name: RICHARD K. HERZER Title: President BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION (successor by merger to Bank of America Illinois) By: /s/ Maria Vickroy-Peralta ------------------------------------- Name: MARIA VICKROY-PERALTA Title: Vice President 4 GUARANTOR ACKNOWLEDGMENT AND CONSENT ------------------------------------ The undersigned, each a guarantor with respect to the Company's obligations to the Bank under the Credit Agreement, each hereby: (1) acknowledges and consents to the execution, delivery and performance by Company of the foregoing Fifth Amendment to Credit Agreement (the "Amendment"), --------- and (2) Reaffirms and agrees that the respective guaranty to which the undersigned is party and all other documents and agreements executed and delivered by the undersigned to the Bank in connection with the Credit Agreement are in full force and effect, without defense, offset or counterclaim. (Capitalized terms used herein have the meanings specified in the Amendment.) IHOP REALTY CORP. By: /s/ Richard K. Herzer ------------------------------------- Name: RICHARD K. HERZER Title: President IHOP RESTAURANTS, INC. By: /s/ Richard K. Herzer ------------------------------------- Name: RICHARD K. HERZER Title: President IHOP PROPERTIES, INC. By: /s/ Richard K. Herzer ------------------------------------- Name: RICHARD K. HERZER Title: President 5