Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Usage Messages Useful for the SHIFT+CONTROL+K Feature

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24379] Usage Messages Useful for the SHIFT+CONTROL+K Feature
  • From: Adalbert Hanssen <hanssen at Zeiss.de>
  • Date: Wed, 12 Jul 2000 23:13:19 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, MathGroup,

last MathWire told us (I like that and I was not aware of it)

   ...Make Template will insert a template based on the currently
   selected function name. To see a template of the command and its
   optional parameters, press SHIFT+CONTROL+K (Windows), SHIFT+
   COMMAND+K (Macintosh), or SHIFT+Mod1+K (X). For example, if your
   selection is Plot, Mathematica will return Plot[f, {x, xmin,
   xmax}], which shows the simplest form of the Plot function..

However, this only holds, if there is an usage definition for 
the template, to be SHIFT+CONTROL+K-ed. The pasted text is the 
first "Word" from the usage message.

Example

anything[x_]:=x;		(* this command must be "executed", of course *)

Type "any" and then SHIFT+CONTROL+K:  it will expand to anything 
(provided no other definitions starting with "any" are there).
Now add an usage message: 

anything::usage="This is a very interesting function. anything[x]..."

Again, type "any" and then SHIFT+CONTROL+K:  it will expand to "This",
which is the first word of the usage message. To really make use
of the feature, the template must be the first thing in the message, 
like in

anything::usage="anything[x_Integer] returns x"; 

Again, type "any" and then SHIFT+CONTROL+K:  it will expand to 

anything[x_Integer]


kind regards

Dipl.-Math. Adalbert Hanszen


  • Prev by Date: List of patterns for which a function is defined?
  • Next by Date: strange Integrate result
  • Previous by thread: Re: List of patterns for which a function is defined?
  • Next by thread: strange Integrate result