"); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>F:\Examples\hello_initials\hello_initials.exe |"> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>F:\Examples\hello_initials\hello_initials.exe |">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

H:\>| WITH Ada.Text_IO; PROCEDURE Hello_Initials IS

Similar presentations


Presentation on theme: "H:\>| WITH Ada.Text_IO; PROCEDURE Hello_Initials IS"— Presentation transcript:

1 H:\>| WITH Ada.Text_IO; PROCEDURE Hello_Initials IS
--| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>|

2 H:\>F:\Examples\hello_initials\hello_initials.exe |
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>F:\Examples\hello_initials\hello_initials.exe |

3 H:\>F:\Examples\hello_initials\hello_initials.exe |
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>F:\Examples\hello_initials\hello_initials.exe |

4 WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character H:\>F:\Examples\hello_initials\hello_initials.exe |

5 Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character Initial2 :Character H:\>F:\Examples\hello_initials\hello_initials.exe |

6 Enter your two initials> |
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character Initial2 :Character H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> |

7 C Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR |

8 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR |

9 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello |

10 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello C|

11 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello CR|

12 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello CR. Enjoy studying Ada!|

13 C R Initial1 :Character Initial2 :Character
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; Initial1 :Character C Initial2 :Character R H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello CR. Enjoy studying Ada! |

14 Enter your two initials> CR Hello CR. Enjoy studying Ada! H:\>|
WITH Ada.Text_IO; PROCEDURE Hello_Initials IS --| Requests, then displays, user's first and last initials. --| Author: Michael Feldman, The George Washington University --| Last Modified: June 1998 Initial1 : Character; -- objects that hold initials Initial2 : Character; BEGIN -- Hello_Initials -- Prompt for (request user to enter) user's initials Ada.Text_IO.Put(Item => "Enter your two initials> "); Ada.Text_IO.Get(Item => Initial1); Ada.Text_IO.Get(Item => Initial2); -- Display user's initials, with a greeting Ada.Text_IO.Put(Item => "Hello "); Ada.Text_IO.Put(Item => Initial1); Ada.Text_IO.Put(Item => Initial2); Ada.Text_IO.Put(Item => ". Enjoy studying Ada!"); Ada.Text_IO.New_Line; END Hello_Initials; H:\>F:\Examples\hello_initials\hello_initials.exe Enter your two initials> CR Hello CR. Enjoy studying Ada! H:\>|


Download ppt "H:\>| WITH Ada.Text_IO; PROCEDURE Hello_Initials IS"

Similar presentations


Ads by Google