MathGroup Archive 1998

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

Search the Archive

Re: Protection against some Front end problems and crashes

  • To: mathgroup at
  • Subject: [mg13201] Re: Protection against some Front end problems and crashes
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 13 Jul 1998 07:42:50 -0400
  • References: <6n6i1o$uo$> <6nc6og$>
  • Sender: owner-wri-mathgroup at

Torben Winther Graversen wrote in message <6nc6og$fas at>...
>Barthelet, Luc (lucb at wrote:
>: As mentionned in a few messages recently it is not uncommon to make a
>: mistake and then get a huge output to be generated. When that happens,
>: one is either stuck for a long time or crashes.
>: reallyBig[x_] := If[ByteCount[x] > 200000, "Too Large", x];
>:   $Post = reallyBig;
>: It will replace any "large" output by the string "Too Large". I cannot
>: count how many times this saved me. Hope it helps you too.
>However, a large plot of 10000 points will easily produce an output
>greater than 200000, but it will be formatted as "- SurfaceGraphics -",
>which is no problem to the frontend.

>Any suggestions for a way to only print "Too Large" when the formatted form
> generates a huge amount of data?


reallyBig[x_] :=
If[ByteCount[x] > 20 &&
 Short[x], (*or "Too Large" or Shallow[x]*)
$Post= reallyBig;


------------------------------------------------------------- Allan
HayesTraining and Consulting
Leicester UK
hay at
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642

  • Prev by Date: Ugly Trig Mess
  • Next by Date: Re: Derivatives D[ ] as Functions inside Tables; Need Help!
  • Previous by thread: Ugly Trig Mess
  • Next by thread: nlim error message using an NIntegrate function in Plot[]