From 44e15da92cbdefdd345a9d5bd495010e85e1378b Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:43:27 -0400 Subject: Spack on Windows: spack.bat comment syntax (#36531) Comments must start with `rem` in most cases. --- bin/spack.bat | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'bin/spack.bat') diff --git a/bin/spack.bat b/bin/spack.bat index 2c2947ac0f..514c2706d7 100644 --- a/bin/spack.bat +++ b/bin/spack.bat @@ -60,28 +60,28 @@ setlocal enabledelayedexpansion :: capture cl args in variable named cl_args set cl_args=%* :process_cl_args -:: tokens=1* returns the first processed token produced -:: by tokenizing the input string cl_args on spaces into -:: the named variable %%g -:: While this make look like a for loop, it only -:: executes a single time for each of the cl args -:: the actual iterative loop is performed by the -:: goto process_cl_args stanza -:: we are simply leveraging the "for" method's string -:: tokenization +rem tokens=1* returns the first processed token produced +rem by tokenizing the input string cl_args on spaces into +rem the named variable %%g +rem While this make look like a for loop, it only +rem executes a single time for each of the cl args +rem the actual iterative loop is performed by the +rem goto process_cl_args stanza +rem we are simply leveraging the "for" method's string +rem tokenization for /f "tokens=1*" %%g in ("%cl_args%") do ( set t=%%~g - :: remainder of string is composed into %%h - :: these are the cl args yet to be processed - :: assign cl_args var to only the args to be processed - :: effectively discarding the current arg %%g - :: this will be nul when we have no further tokens to process + rem remainder of string is composed into %%h + rem these are the cl args yet to be processed + rem assign cl_args var to only the args to be processed + rem effectively discarding the current arg %%g + rem this will be nul when we have no further tokens to process set cl_args=%%h - :: process the first space delineated cl arg - :: of this iteration + rem process the first space delineated cl arg + rem of this iteration if "!t:~0,1!" == "-" ( if defined _sp_subcommand ( - :: We already have a subcommand, processing args now + rem We already have a subcommand, processing args now if not defined _sp_args ( set "_sp_args=!t!" ) else ( @@ -109,8 +109,8 @@ for /f "tokens=1*" %%g in ("%cl_args%") do ( ) ) ) -:: if this is not nil, we have more tokens to process -:: start above process again with remaining unprocessed cl args +rem if this is not nil, we have more tokens to process +rem start above process again with remaining unprocessed cl args if defined cl_args goto :process_cl_args -- cgit v1.2.3-60-g2f50