[Date Index] [Thread Index] [Author Index]
Problem with Contexts
I experienced the following problem when defining Contexts: Mathematica 2.2 for NeXT Copyright 1988-93 Wolfram Research, Inc. -- NeXT graphics initialized -- In:= Begin["Alice`"] Out= Alice` In:= x=1;y=2;x+y Out= 3 In:= Begin["Bob`"] Out= Bob` In:= x=11;y=22;x+y Out= 33 In:= Begin["Alice`"];y-x Out= 11 In:= y-x Out= 1 In:= Exit For the In I try to change the Context and do a calculation in the same command, but the calculation is done using the previous Context ("Bob"). However, the Context was changed as noted when the calculation is repeated (In). Is this a bug or am I missing something about how Contexts are used and defined. BTW--I found the same problem when using the Notebook interface BUT when I concatenate the commands on separate lines it works okay-- Begin["Alice"];y-x doesn't work, but Begin["Alice"]; y-x (the Shift-Return) does work. Thanks for the help, Charlie -- NeXTMail to: | ...to confer, converse, and charlie at technosci.com | otherwise hobnob with my | brother wizards.