LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Parenthesis - to use or not to use?

Greetings all

Quick question - In John Green et al's Excel 2000 VBA I find the
following assertion: "The general rule is that if you want to capture
the return value of a function, you need to put any argument in
parenthesis. If you don't want to use the return value, you should not
use parenthesis."

The first sentence is of course a nonnegotiable point of syntax - but
what about the second sentence? I was under the impression that it is
100% a matter of taste if I write msgbox "Hello world" or
msgbox("Hello world"), but the word "should" above suggests that there
is a principled reason to drop parenthesis if not needed. Is there? In
particular, does the computer in some sense process a non-returned
value if you include parenthesis but not otherwise, so that a small
performance hit attaches itself to parenthesis? Also, what about sub
calls when there is no return value to worry about?
If it is just a matter of taste I'll stick to parenthesis since it
seems somehow more logical to me.

Thank you for your time.

-John Coleman
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MISSING PARENTHESIS Kanmi Excel Worksheet Functions 3 June 26th 09 10:51 PM
parenthesis puiuluipui Excel Discussion (Misc queries) 2 May 27th 08 01:59 PM
Short key for parenthesis - Hot key Anders Excel Discussion (Misc queries) 0 December 19th 07 09:09 AM
Parenthesis problem gmangrove Charts and Charting in Excel 1 December 21st 06 03:11 AM
WHAT ARE PARENTHESIS IN FORMULAS? ann New Users to Excel 2 August 21st 06 10:43 PM


All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"