diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-11-15 20:54:59 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-11-15 21:01:55 (GMT) |
commit | b82526c6542afbaea7e315cc4628cacdfe90ebae (patch) | |
tree | 20ef78a2fc3e9a92469de80456dfca9ebcae997f /Help/command | |
parent | b32474322907fcd2658ad964847fc62b02659517 (diff) | |
download | CMake-b82526c6542afbaea7e315cc4628cacdfe90ebae.zip CMake-b82526c6542afbaea7e315cc4628cacdfe90ebae.tar.gz CMake-b82526c6542afbaea7e315cc4628cacdfe90ebae.tar.bz2 |
Help: Minor grammar and typo corrections for macro command docs
Follow-up to !2616, specifically commit 22cca9b810
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/macro.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Help/command/macro.rst b/Help/command/macro.rst index 42a99fc..464940f 100644 --- a/Help/command/macro.rst +++ b/Help/command/macro.rst @@ -76,16 +76,16 @@ Macro vs Function The ``macro`` command is very similar to the :command:`function` command. Nonetheless, there are a few important differences. -In a function, ``ARGC``, ``ARGC`` and ``ARGV0``, ``ARGV1``, ... are -true variables in the usual CMake sense. In a macro, they are not. -They are string replacements much like the C preprocessor would do +In a function, ``ARGN``, ``ARGC``, ``ARGV`` and ``ARGV0``, ``ARGV1``, ... +are true variables in the usual CMake sense. In a macro, they are not, +they are string replacements much like the C preprocessor would do with a macro. This has a number of consequences, as explained in the :ref:`Argument Caveats` section below. Another difference between macros and functions is the control flow. A function is executed by transfering control from the calling statement to the function body. A macro is executed as if the macro -body were pasted in place of the calling statement. This has for +body were pasted in place of the calling statement. This has the consequence that a :command:`return()` in a macro body does not just terminate execution of the macro; rather, control is returned from the scope of the macro call. To avoid confusion, it is recommended @@ -96,7 +96,7 @@ to avoid :command:`return()` in macros altogether. Argument Caveats ^^^^^^^^^^^^^^^^ -Since ``ARGC``, ``ARGC``, ``ARGV0`` etc are not variables, +Since ``ARGN``, ``ARGC``, ``ARGV``, ``ARGV0`` etc. are not variables, you will NOT be able to use commands like .. code-block:: cmake |