MathGroup Archive 2006

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

Search the Archive

Re: Context


I'm sorry to be a bearer of bad tidings, but that's exactly what the
manual states in Built-in Functions -> Begin,

"Begin thus affects the PARSING of input expressions."

Sorry
Philipp

P.S. You need a back quote at the end of the context string in
Begin["x`"].

Cheers.

dh wrote:

> 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


  • Prev by Date: Re: Factor.....
  • Next by Date: Re: Context
  • Previous by thread: Re: Context
  • Next by thread: RE: Context