Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Mathematica - General Programming style' topicStudent Support Forum > General > Archives > "Mathematica - General Programming style"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
04/24/13 9:49pm

In Response To 'Re: Re: Mathematica - General Programming style'
---------
You wrote: "The % operator only seems to work when in the body of the main program. As soon as I package a bunch of lines from my code into a function than the whole concept falls apart. The % seems to refer to the output of the entire function in this case."

That is fascinating. I've never fallen into that particular hole, or didn't recognize it if I did.

The help pages for Out[] (which is %) sort of explains that this is how it works, but I probably would not have realized this would happen inside a function if you hadn't described the behavior you have seen.

Thank you. I'll think about this some more.

URL: ,

Subject (listing for 'Mathematica - General Programming style')
Author Date Posted
Mathematica - General Programming style speleomania 04/23/13 1:13pm
Re: Mathematica - General Programming style Bill Simpson 04/23/13 3:53pm
Re: Re: Mathematica - General Programming style speleomania 04/24/13 4:10pm
Re: Re: Re: Mathematica - General Programming s... Bill Simpson 04/24/13 9:49pm
Re: Mathematica - General Programming style hieron 04/23/13 6:18pm
Re: Re: Mathematica - General Programming style speleomania 04/24/13 4:14pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic