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

MathGroup Archive 2007

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

Search the Archive

Re: [TS 503]--Re:OverVector Context

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72636] Re: [TS 503]--Re:OverVector Context
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 13 Jan 2007 04:13:55 -0500 (EST)
  • References: <200701121400.l0CE00RN032653@localhost.localdomain>

Tom,

You'll see the difference if you put something like Subscript in place
of OverVector. Subscript is in the "System`" context. OverVector
doesn't have a context defined, but somehow still has formatting rules
(meaning Mathematica is looking at only the local name of the symbol
to do the formatting in the case of OverVector).

BeginPackage@"Heh`";
Begin@"`Private`";
OverVector@b;
Context@OverVector

On Fri, 12 Jan 2007 14:00:00 UT, support at wolfram.com
<support at wolfram.com> wrote:
>  -- Wolfram Research Technical Support --
>
> This is a response to your email.
> The reply to your question can be found at the bottom of this message.
> Our classification number for this message is: [TS 503]
> Please give this number in any future correspondence
> related to this question. If you leave this number in
> the Subject: header in the form [TS 503], it will
> automatically be reassigned to the original technician.
>
> From: "Chris Chiasson" <chris at chiasson.name>
> Date: Sun, 7 Jan 2007 07:26:42 -0600
> Subject: OverVector Context
> To: "support at wolfram.com" <support at wolfram.com>,mathgroup <mathgroup at smc.vnet.net>
>
> OverVector doesn't have a context at the beginning of a session
>
> BeginPackage@"Heh`";
> Begin@"`Private`";
> OverVector@b;
> Context@OverVector
>
> gives
>
> "Heh`Private`"
>
> I guess this is somewhat useful because it allows package authors to
> give DownValues values to OverVector@arg without worrying about the
> effect in another package. However, I am wondering why the Context is
> any different from, say, Subscript?
>
> It just seems weird to have default formatting rules for symbols (like
> OverBar and OverVector) with certain local names but any Context name.
>
> --
> http://chris.chiasson.name/
>
> _______________________________________________________________________
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Chris,
>
> Unless I am missing something, I think how and why of this is covered in
> the Documentation for BeginPackage.  There is also an FAQ at:
>
> http://support.wolfram.com/mathematica/packages/writing/context.html
>
> and other package writing FAQs at:
>
> http://support.wolfram.com/mathematica/packages/writing/
>
> If there are examples that don't fit the described behavior, please
> send them in.
>
> Tom Zeller
> Wolfram Research Technical Support
>
>
>
>
>
> ----------------------------------------------------------------------------
>
> If this issue is resolved, please consider taking a few minutes
> to give us some feedback on your experience. Please visit
> http://support.wolfram.com/survey/?trackingnumber=503
> and give your honest answers to these three short questions.
> Thanks for taking the time to help us improve.
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: RE: Nminimize: Give Initial values to Decision Variables
  • Next by Date: Writing 16 Bit Image in Dicom Format
  • Previous by thread: Re: Sorting by date
  • Next by thread: Writing 16 Bit Image in Dicom Format