Re: Protection against some Front end problems and crashes
- To: mathgroup at smc.vnet.net
- Subject: [mg13022] Re: [mg12943] Protection against some Front end problems and crashes
- From: "Jrgen Tischer" <jtischer at col2.telecom.com.co>
- Date: Tue, 30 Jun 1998 00:26:20 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hi Luc, thanks for the hint, I was in real need of something of that type. I even have to offer a slight improvement: reallyBig[x_] := If[ByteCount[x] > 200000, Shallow[x], x]; $Post = reallyBig; This way you know what the output is about and can use it for further calculation. There are still some funny side effects, for example a big InterpolatingFunction can produce a quite unfamiliar output; and then try the following: f[a__]:=a; f[1,2]. But in general it works just fine. Jrgen -----Original Message----- From: Barthelet, Luc <lucb at ea.com> To: mathgroup at smc.vnet.net Subject: [mg13022] [mg12943] Protection against some Front end problems and crashes > >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. > >A while back, support at Wolfram gave me this trick that I now have at >the top of any notebook manipulating large amount of data: > >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. > >Experience as shown that 200000 enabled me to always see what I want. > >Sincerely, > >Luc Barthelet >GM at day, Mayor at Night >http://www.simcity.com > >