Short

Short[expr]

prints as a short form of expr, less than about one line long.

Short[expr,n]

prints as a form of expr about n lines long.

Details

  • Short[expr] gives a "skeleton form" of expr, with omitted sequences of k elements indicated by k.
  • In StandardForm, the characters used for this output are \[LeftSkeleton] and .
  • Omitted sequences of elements are printed as Skeleton objects.
  • Short prints long strings in skeleton form.
  • The number of lines specified need not be an integer.
  • Short can be used with InputForm and other formats as well as OutputForm.
  • When an input evaluates to Short[expr], Short does not appear in the output. »
  • Trying to feed k as obtained from Short back as input to the Wolfram Language in StandardForm will generate an error. »

Examples

open allclose all

Basic Examples  (2)

Shorten the display of a large polynomial to about one line:

Allow about three lines:

Properties & Relations  (3)

Shortened outputs contain Skeleton objects:

Shallow displays with long expressions shortened from the end:

When an input evaluates to Short[expr], Short does not appear in the output:

Out is assigned the result Range[50], not Short[Range[50]]:

Possible Issues  (2)

The output of Short cannot be used as input if k appears in the result:

Copy the output and paste it into an input cell. The k will cause an error:

Even when an output omits Short from the top level, it is not stripped from subexpressions:

The output does not have Short in it:

However, the variable e does have Short in it, which may affect subsequent evaluations:

This Join is not evaluated due to the intervening Short:

Assign variables first and then apply Short to the result to maintain computability:

Wolfram Research (1988), Short, Wolfram Language function, https://reference.wolfram.com/language/ref/Short.html (updated 1996).

Text

Wolfram Research (1988), Short, Wolfram Language function, https://reference.wolfram.com/language/ref/Short.html (updated 1996).

CMS

Wolfram Language. 1988. "Short." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Short.html.

APA

Wolfram Language. (1988). Short. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Short.html

BibTeX

@misc{reference.wolfram_2024_short, author="Wolfram Research", title="{Short}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Short.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_short, organization={Wolfram Research}, title={Short}, year={1996}, url={https://reference.wolfram.com/language/ref/Short.html}, note=[Accessed: 21-November-2024 ]}