Is It Possible To Write A Package Specification Without A Package Body?

Category: QuestionsIs It Possible To Write A Package Specification Without A Package Body?
Editor">Editor Staff asked 2 years ago

Is It Possible To Write A Package Specification Without A Package Body?

1 Answers
Editor">Editor Staff answered 2 years ago

Yes, it is possible to write a package specification without a package body but not the vice versa. This is specifically used if there is a package, which is only used for the declaration of public variables, types, constants, and exceptions. In such case, there is no need for a package body and only package specification is enough.