Re: InputAutoReplacements With "-marks
- To: mathgroup at smc.vnet.net
- Subject: [mg46105] Re: InputAutoReplacements With "-marks
- From: drbob at bigfoot.com (Bobby R. Treat)
- Date: Fri, 6 Feb 2004 04:15:28 -0500 (EST)
- References: <bvt2as$oqh$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You were leaving out the quotes that would require those escapes. Here's my new value for InputAutoReplacements. Notice the left and right hand sides are all strings. {"ff" -> "FullForm", "mf" -> "MatrixForm", "cg" -> "Clear[\"Global`*\"]"} Thanks for the idea, by the way. Bobby Harold.Noffke at wpafb.af.mil (Harold Noffke) wrote in message news:<bvt2as$oqh$1 at smc.vnet.net>... > MathGroup: > > In running different learning examples for Mathematica 5.0, I > repetitively use Clear["Global`*"] to reset all my variables. I tried > to make "cg" into an InputAutoReplacements alias with the Option > Inspector by defining ... > > cg -> Clear[\"Global`*\"] > > After clicking OK twice and re-inspecting this entry, I found that > Mathematica had processed it into ... > > Clear[ Times[ "Global`, "]] > > which is not what I expected. So, I redefined ... > > cg -> Clear[\"Global`\*\"] > > because the Mathematica Book says ... > > \* in effect acts like an escape: it allows you to enter ordinary > Mathematica syntax even within a \( ... \) sequence. Note that the > input you give after a \* can itself in turn contain \( ... \) > sequences. > > Mathematica processes the new cg definition into ... > > Clear[ "Global`\*"] > > which is not what I expected, either. > > Tests of both definitions for cg yield failures with error messages. > > Are such InputAutoReplacements beyond the scope of Mathematica 5.0? > > Thanks. > Harold