Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Context

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70956] Context
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 2 Nov 2006 06:49:08 -0500 (EST)

Hello,

consider:

fun[x_]:=( Begin[x];

       Print[t];

       End[];

       );

according to the manual one would think that the variable t in context x 

is printed. However, this is wrong! What is printed is Global`t. 

Therefore, the context to which a symbol belongs is determined during 

parsing and NOT execution.

Can anybode give more insight and strict rules for this quirck?

Daniel



  • Follow-Ups:
    • Re: Context
      • From: Yasvir Tesiram <yat@omrf.ouhsc.edu>
    • Re: Context
      • From: "Chris Chiasson" <chris@chiasson.name>
    • Re: Context
      • From: "Chris Chiasson" <chris@chiasson.name>
  • Prev by Date: Factor.....
  • Next by Date: SchematicSolver and MathModelica
  • Previous by thread: Re: Factor.....
  • Next by thread: Re: Context