MathGroup Archive 2010

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

Search the Archive

discussions on the language: For and Which

  • To: mathgroup at
  • Subject: [mg111561] discussions on the language: For and Which
  • From: Li Zhengji < at>
  • Date: Thu, 5 Aug 2010 07:00:23 -0400 (EDT)

Hi all,

1. Attributes of For are {HoldAll, Protected}.

But I think HoldRest is just OK for For, because the first argument
"start" is evaluated once in every For.

2. Which takes even number of arguments

If we want a "default" branch in Which, we need to set the last 2
argument to "True, XXX".

Obviously, Which can be extended this without any problem: allow odd
number of arguments, and the last argument is treated as the "default"

Best Regards,
Li Zhengji

  • Prev by Date: Re: Save a notebook state
  • Next by Date: Re: Deleting entries with zero in a table
  • Previous by thread: Re: A new graphic user interface
  • Next by thread: Format