-- file B_Str_package.ads ("s" for "spec") package B_Str_pkg is -- pronounce this as "package **SPEC** B_Str_pkg is ..."; -- In Ada: we have .ads and .adb files -- In C: we have .h and .c files -- In Java: we have interface and class-implements type B_Str is private; procedure put(bw: B_Str); function "="(left, right: B_Str) return Boolean; function get_B_Str return B_Str; function new_B_Str( txt: String ) return B_Str; Text_Too_Long_Buddy: Exception; private -- A spec file has two parts: before "private" and after "private" -- (unlike Java, where each method and field can be marked separately, regardless of where-in-file). type B_Str is record chars: String(1..37); length: Natural; end record; -- But *Why* do we need the type-declaration here, rather than just off in the .adb? -- because for somebody to compile with a B_Str, they must know its *size*. end B_Str_pkg;