• Humptsed
    了解作者
  • Dev C++
    开发工具
  • 61KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2019-05-25 17:31
    上传日期
The Craft of Object-Oriented Programming
7539587.rar
  • ch07
  • eg06
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1.4KB
  • eg08
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1.6KB
  • eg07
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1.5KB
  • eg02
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1.1KB
  • eg09
  • word_count.adb
    1.8KB
  • eg03
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1KB
  • eg04
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1012B
  • eg01
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    934B
  • eg05
  • je-day_of.adb
    1010B
  • je.ads
    604B
  • weekday.adb
    1.4KB
  • ch10
  • je-times.ads
    3.6KB
  • je-diaries.adb
    3KB
  • je-times.adb
    3.1KB
  • je.ads
    604B
  • diary-diary_view.adb
    5.1KB
  • je-appointments.adb
    1.4KB
  • je-appointments.ads
    1.2KB
  • diary.adb
    1.9KB
  • je-diaries.ads
    1.5KB
  • ch18
  • spreadsheet.adb
    1KB
  • je-spreadsheets.adb
    6.6KB
  • je-lists.ads
    2.1KB
  • je-expressions.adb
    8.1KB
  • je-views-spreadsheet.adb
    5.1KB
  • je-expressions.ads
    5.6KB
  • je-spreadsheets.ads
    4.8KB
  • je-pointers.adb
    2.1KB
  • je-expressions-spreadsheet.adb
    2.1KB
  • je.ads
    604B
  • je-lists.adb
    4.2KB
  • je-expressions-spreadsheet.ads
    1.4KB
  • je-views.ads
    629B
  • je-views-spreadsheet.ads
    1.2KB
  • je-pointers.ads
    1.3KB
  • ch12
  • eg02
  • sort.adb
    2.7KB
  • eg03
  • je-lists.ads
    2KB
  • je-menus.ads
    1.3KB
  • je-menus.adb
    3KB
  • je-times.ads
    3.6KB
  • je-diaries.adb
    3.6KB
  • je-times.adb
    3.1KB
  • je.ads
    604B
  • diary-diary_view.adb
    3.8KB
  • je-lists.adb
    3.9KB
  • je-appointments.adb
    1.4KB
  • je-appointments.ads
    1.2KB
  • diary.adb
    2KB
  • je-diaries.ads
    1.4KB
  • eg01
  • je-lists.ads
    2KB
  • je-times.ads
    3.6KB
  • je-diaries.adb
    3.6KB
  • je-times.adb
    3.1KB
  • je.ads
    604B
  • diary-diary_view.adb
    5.1KB
  • je-lists.adb
    3.9KB
  • je-appointments.adb
    1.4KB
  • je-appointments.ads
    1.2KB
  • diary.adb
    1.9KB
  • je-diaries.ads
    1.4KB
  • ch05
  • eg02
  • greetings.adb
    991B
  • eg03
  • greetings.adb
    971B
  • eg01
  • greetings.adb
    809B
  • ch17
  • je-expressions.adb
    8.1KB
  • calculator.adb
    1.2KB
内容介绍
ADA 95: THE CRAFT OF OBJECT-ORIENTED PROGRAMMING -- EXAMPLES ------------------------------------------------------------ This archive contains the example programs from "Ada 95: The Craft of Object-Oriented Programming" by John English (Prentice Hall 1997). This book is now out of print, so I've converted it to HTML format and released it online (see http://www.it.bton.ac.uk/staff/je/adacraft/). Errata from the printed copy of the book and minor errors from earlier versions of these examples have been corrected. The examples have been tested using GNAT 3.13p on Linux and Windows platforms. 1. Building the examples. ------------------------- The examples from each chapter are in separate subdirectories (ch02 through ch19, corresponding to chapters 2 through 19). Most chapters contain multiple examples, and these are in separate subdirectories called "egXX" where XX is the example number. There is also a "packages" subdirectory containing the final version of each of the major packages developed in the book. See the file "examples.txt" for a description of the examples supplied. Since many of the files are used in more than one example, the distribution for Unix systems (adacraft.tar.gz) uses symbolic links to avoid unnecessary duplication of files. Take care if you want to modify any of the files, as you might end up modifying the master copy in the process! The distribution for Windows (adacraft.zip) doesn't use symbolic links, so many of the files are duplicated. The distribution is a bit bigger, but it also means that you don't need to worry about modifying a master copy of a file. You can compile all the examples by running "sh build.sh" on Unix systems, or "build.bat" on Windows systems. This assumes that you have the GNAT compiler installed on your system. 3. GNAT bugs and workarounds. ----------------------------- There are some known problems outstanding due to bugs in GNAT: Extension aggregates: Affects: ch14/eg03, ch15/eg01, ch15/eg02, ch16/eg01 Status: GNAT 3.01 - 3.05 Symptom: The common appointment part of derived appointments gets lost (and dates usually appear as 1-JAN-1970 as a result). Interestingly enough, extension aggregates used to work properly in GNAT 2.07... :-( Solution: Upgrade to GNAT 3.07 or later where the problem has been fixed, or copy the files in the ch14/ch15/ch16 subdirectories of the "fixes" directory to the corresponding chapter subdirectories. These do everything the long way round, avoiding the use of extension aggregates. The 'Class'Input attribute: Affects: ch15/eg01, ch15/eg02, ch16/eg01 Status: GNAT 3.01 Symptom: GNAT 3.01 incorrectly reports an error when 'Class'Input or 'Class'Output are used with for an abstract class. To get around this, the abstract parent type can be derived from a concrete type which can then be used to call 'Class'Input or 'Class'Output. Unfortunately this won't help; loading a diary will fail, usually with a Data_Error. This is because the 'Class'Input routine skips some of the data as it reads the file (but 'Class'Output works fine!). Solution: Upgrade to GNAT 3.03 or later, where the problem has been fixed. Exception handling: Affects: ch18 Status: GNAT 3.01 (only under SunOS) Symptom: Cells containing formulas which reference empty cells will crash with a protection fault. An Undefined_Cell_Error is being raised but never gets to its handler. Solution: Upgrade to GNAT 3.03 or later where the problem has been fixed, or use GNAT 3.01 under any other operating system. Tasking not supported under MS-DOS: Affects: ch19 (all) Status: GNAT 3.01 - 3.03 (MS-DOS) Symptom: All examples from chapter 19 fail to link with the MS-DOS port of the compiler. Solution: Use a different operating system, or upgrade to GNAT 3.04 or later. Tasks with discriminants: Affects: ch19/eg02, ch19/eg06 Status: GNAT 3.01 Symptom: Discriminant values are not passed correctly to tasks, so the task test program in example 2 will be executed a random (usually large!) number of times. Solution: Upgrade to GNAT 3.03 or later, where the problem has been fixed. Tasks as components in a type extension: Affects: ch19/eg06 Status: GNAT 3.01 - 3.08 Symptom: If a task is used as a component when deriving from a tagged type, the compiler will crash with an assertion error if you try to create an object of the derived type using "new". Solution: Copy the files in the ch19 subdirectory of the "fixes" directory to the corresponding chapter subdirectory. This uses a pointer to a task as the record component rather than using a task; the constructor function is modified to create the task using "new" and assign the resulting pointer to the record component. Note that under GNAT 3.01 the program will then compile but it will crash when you try to run it because the task discriminant (a pointer to the spreadsheet) will have been passed to the task incorrectly, as described above. Get_Immediate broken: Affects: ch19/eg06 Status: GNAT 3.01 - 3.08 (SunOS, Solaris, Win95/NT) Symptom: Get_Immediate ignores keyboard input (except ^C) under SunOS and Solaris; under Windows 95/NT it behaves like Get (i.e. it blocks until the Enter key has been pressed). It works fine under other operating systems. Solution: Use a different operating system, or upgrade to GNAT 3.05 or later in the case of SunOS/Solaris. The compiler bugs have been reported to the GNAT development team, so hopefully they will be fixed in a future release. Any other bugs are entirely my fault; please email me at the address below if you discover any, or if you have any other comments or suggestions to make. Note that I have deliberately left some examples incomplete (e.g. the lack of Data_Error handling in the diary package's Load procedure) so that readers still have some work to do; these omissions are features, not bugs (:-). The documentation in the examples is also minimal; it's all in the book (implication: buy the book!). And most importantly of all, have fun learning Ada 95! -- John English (je@brighton.ac.uk).
评论
    相关推荐
    • 3DES加密算法源代码.rar
      DES加密源代码,用3DES加密算法。 加密强度高,到目前为止,还无人能够破解!
    • crc.zip
      CRC校验程序,使用了CRC-16和CRC-CCITT方法
    • rsa1.03.zip
      rsa算法实现,包含文档
    • fast-des3.0.tar.z
      des算法实现源码
    • des3_win32_vc.zip
      一个3des算法的库文件和使用库文件的例子
    • dcpcrypt.zip
      Delphi加密控件源码,包括对称钥匙加密控件和散列函数控件
    • rc.zip
      含有rc2、rc4、rc5、rc6算法的rc算法集合
    • oicqpass.zip
      读取OICQ用户保存在本地机器上的密码
    • elgamal.zip
      另一种公开密钥加密算法的Pascal实现和例子。实现了签名和确认
    • linuxscanners.zip
      linux下的端口扫描器