Re: parentheses




sizors_1@xxxxxxxxxxx wrote:
Is it correct to say that *all* mathematical expressions should
properly be enclosed within parentheses, even though often parentheses
are omitted?

I wouldn't say it's necessarily correct, but it could be used in some
contexts.

Even a seemingly simple example like 12 x 4 suggests that
12 has parentheses, otherwise 12 x 4 = 10 + 2 x 4 = 18, and obviously
12 x 4 is never interpreted this way. So isn't it technically correct
to write (12) x 4?

In this case, I would say no. You are confusing the number with its
representation. It's only 10+2 because you chose to use Base 10.
Had you used Base 16, the representation is C. How can a number
be both an expression and not an expression simultaneously?

Or perhaps you should go all the way and write
((12) x (4)). The outermost parentheses could be important in cases of
substitution, but I see no reason to enclose the single digit 4 in
parentheses.

You would if you wrote computer programs.

Nonetheless what I'm interested in is the proper syntax
(formation) rules for expressions. I've seen inconsistencies in
different texts. For example, in Gries' A Logical Approach to Discrete
Math, he *first* says that constants like 231 are expressions, and
*then* says that if E is an expression, then (E) is an expression.

I don't see that as an inconsistency.

In MS-Access, a calculated field gets a default name indicating
it is an expression

Expr1: [Result]*4

and it's still an expression regardless of whether or not there are
multiple terms/operators

Expr2: [Result]
Expr3: 4

Isn't this incorrect based on the example I cite above?

The fact that "12" is an expression doesn't mean that it's "10+2".

Another
example would be negative intergers like -12? Shouldn't this be
expressed (-(12)), otherwise -12 = -10 + 2 =
-8.

No, because 4 is also an expression even though you can't break
it apart like you can 12.

My bottom line question is, are *all* mathematical expressions --
including variables like x, y, etc., properly defined as being enclosed
in parentheses, even in cases where parentheses wouldn't seem
necessary?

My opinion is still no.


Thanks

.



Relevant Pages

  • Re: passing a multi dimensional array as a parameter, or returning one from a function
    ... enclose the args of a sub in parentheses if you use "call." ... I am trying to either pass in a multi dimensional array as a parameter ... This doesn't even compile though with an error of: Compile Error: ...
    (microsoft.public.office.developer.vba)
  • Re: using sumifs to sum based on month, and criteria
    ... but semi-colons are used for commas. ... parentheses to enclose the date argument to the MONTH function, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: using sumifs to sum based on month, and criteria
    ... Jonas did. ... not replace the need for arguments enclosed in parentheses. ... parentheses to enclose the date argument to the MONTH function, ... I tried the following formula to sum over all dates in April, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: using sumifs to sum based on month, and criteria
    ... Where did Bob use month without arguments? ... not replace the need for arguments enclosed in parentheses. ... parentheses to enclose the date argument to the MONTH function, ... I now wish to go through all the rows in the list, and sum the values ...
    (microsoft.public.excel.worksheet.functions)
  • RE: Required field on form
    ... parentheses when calling it; if its called as an event property of a control ... is the same as an Access reserved word has to have the brackets so Access ... The parenthesis enclose the arguments of the IsNull function. ... The field which needs to be mandatory is called "Date Received". ...
    (microsoft.public.access.gettingstarted)

Quantcast