MathGroup Archive 2007

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

Search the Archive

Re: a beginner's question

  • To: mathgroup at
  • Subject: [mg77797] Re: [mg77768] a beginner's question
  • From: DrMajorBob <drmajorbob at>
  • Date: Sun, 17 Jun 2007 06:01:18 -0400 (EDT)
  • References: <30732921.1181981513900.JavaMail.root@m35>
  • Reply-to: drmajorbob at

Module declares p to be a local variable, so that it doesn't conflict with  
a global p you might be using. Block and With do the same thing, but with  
different context rules. It will take a little time to get used to  
determining which you need, if any.

For ";", look up CompoundExpression -- or highlight ";" and press the Help  
key. It separates several expressions and returns the value of the last 
expression in the sequence.


On Sat, 16 Jun 2007 02:31:31 -0500, tung tran <tunganhtr at> wrote:

> I am a beginner in Mathematica and in programming. I read the book "An
> Introduction to Programming with  Mathematica".
> Page 155:
>  FindSubsequence[lis_List, subseq_List] := Module[{p}, p =  
> Partition[lis, Length[subseq], 1]; Position[p, Flatten[{___, subseq,  
> ___}]]]
> I want to know more about the role of Module function and " ; "  in  
> these lines. I have read documentation about Module function but it  
> doesn't help me much in understanding this line of code. Thanks for  
> helping me !
> Regards,
> Tung Anh

DrMajorBob at

  • Prev by Date: Re: StringReplace
  • Next by Date: Re: Trying to find exported file, converting table to two column text output
  • Previous by thread: Re: a beginner's question
  • Next by thread: Re: a beginner's question