OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Show the (RefLink[Import, paclet:ref/Import]) elements available in a sample file:

Import["ExampleData/Collatz.m", "Elements"]

Import unevaluated expressions from this file:

Import["ExampleData/Collatz.m", "HeldExpressions"]

Import all expressions and run them through (RefLink[Inactivate, paclet:ref/Inactivate]):

Import["ExampleData/Collatz.m", "InactivatedExpressions"]

Import only the first expression from the package in (RefLink[Inactive, paclet:ref/Inactive]) form:

Import["ExampleData/Collatz.m", {"InactivatedExpressions",1}]

Export an arbitrary expression to the package format:

ExportString[f["α"], "Package"]

Import the previous output:

ImportString[ %, "Package" ]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[MX, paclet:ref/format/MX])  ▪  (RefLink[ExpressionML, paclet:ref/format/ExpressionML])  ▪  (RefLink[NB, paclet:ref/format/NB])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Formats, paclet:guide/BasicFormats])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}})}})