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

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

Search the Archive

Re: Question regarding Mathematica's treatment of whitespace

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61806] Re: [mg61795] Question regarding Mathematica's treatment of whitespace
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Sun, 30 Oct 2005 05:50:00 -0500 (EST)
  • References: <200510300443.AAA09795@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I don't know how to do it, but it may be easier to change the way that
the Mathematicia Front End automatically indents/spaces code to your
"one true braces form" (to quote Joel Spolsky without looking up the
real quotation...)

On 10/29/05, Matt <anonmous69 at netscape.net> wrote:
> Hello,
>   It seems that most of the time Mathematica ignores whitespace.  e.g. all of
> the following evaluate with no problem:
>
> Sin    [
> Pi/2
> ]
>
>
> Sin    [
>
>
>
> Pi/2
>
>
>
> ]
>
>
> However,
>
> Sin
> [Pi/2]
>
> does not.  Is that just the way it is?  The reason I ask, is because I
> would like to be able to use brackets '[,]' as I do braces in C/C++ to
> help show the 'flow' of logic (within larger functions obviously), but
> obviously Module[] doesn't work if it sees a cr/lf before the opening
> bracket.
>
> Thanks,
>
> Matt
>
>


--
http://chrischiasson.com/contact/chris_chiasson


  • Prev by Date: Re: graphing x^2+4 on x, y, and i
  • Next by Date: Re: http://www.mathematica-users.org off-line?
  • Previous by thread: Question regarding Mathematica's treatment of whitespace
  • Next by thread: Re: Question regarding Mathematica's treatment of whitespace