Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why printing?

  • To: mathgroup at
  • Subject: Re: Why printing?
  • From: jacobson at
  • Date: Mon, 05 Apr 93 08:44:57 -0700

Trott Michael <Michael.Trott at> notes the


 This prints z!!!

This is a normal consequence of the strange semantics of Mathematics.

For the pattern {x___,a,y___} to match {a,b}, x must be bound to an
empty sequence: Sequence[].  Now the FullForm of the Print thing is
Print[CompoundStatement[z,x]].  When we replace x by Sequence[], we
get Print[CompoundStatement[z,Sequence[]]], which immediately
collapses to Print[CompoundStatement[z]], which then evaluates to

You have to be real careful with Sequences.  This is but one of many
examples where they result in unexpected behavior.

  -- David Jacobson

  • Prev by Date: line thickness and ScatterPlot3D
  • Next by Date: Help me
  • Previous by thread: Re: Why printing?
  • Next by thread: Re: Why printing?