diff --git a/content/_index.md b/content/_index.md index 88bf844..a95d60b 100644 --- a/content/_index.md +++ b/content/_index.md @@ -94,7 +94,7 @@ inside x.bat Actual filename: x.bat ``` -The result shows that the closing parenthesis delimits the filename to be called to the right and that the `x.bat` has priority when either filename is being interpreted by the Windows Command Prompt. +The result shows that the opening parenthesis delimits the filename to be called to the right and that the `x.bat` has priority when either filename is being interpreted by the Windows Command Prompt. This is backed by the fact that upon removing ``x.bat`` from the working directory, the extensionless `x` will still not be called by the calling lines of code in either case: ```bash= @@ -105,7 +105,7 @@ C:\Users\defaultuser>call x.bat( The command "x.bat" is either misspelled or could not be found. ``` -The next three cases (ll. 8-10) fail to call the files as well. As seen before, the closing parenthesis in **lines 8 and 9** delimit the filenames to the right, now yielding empty filenames (because the files' names on disk start with the closing parenthesis). Hence, the Windows Command Prompt interprets these two lines of code simply as a `call` command with empty arguments, yielding in an empty output with no file being called: +The next three cases (ll. 8-10) fail to call the files as well. As seen before, the opening parenthesis in **lines 8 and 9** delimit the filenames to the right, now yielding empty filenames (because the files' names on disk start with the opening parenthesis). Hence, the Windows Command Prompt interprets these two lines of code simply as a `call` command with empty arguments, yielding in an empty output with no file being called: ```bash= C:\Users\defaultuser>call (x.bat @@ -276,4 +276,4 @@ C:\Users\defaultuser>set /a 2+3 ***Conclusion***: - *Batch normally assigns leading and trailing whitespaces to set variables and their values respectively (except for the separating whitespace between the `set` command name and its first argument). Interestingly, the characters `,` and `;` function as both a separation character between the `set` command name and its first argument AND as part of the variable name. This is not the case for `=`, which instead leads to a syntax error.* - *Moreover, `/p` switch assignments ignore leading whitespace characters for their prompt text. They yield syntax errors when a prompt starts with an `=` character; and leading `,` and `;` characters (which often count as leading whitespace characters for in other Batch command contexts) become part of the displayed prompt.* -- *When using the `/a` switch, leading and trailing whitespace characters of both, the variable name AND its value get ignored and whitespaces within a variable name is syntactically not allowed. Note that the latter is valid in the no-switch and `/p` cases. An arithmetic assignment usage without a variable name being stated is syntactically valid. Variable names during an arithmetic assignment must not contain typical arithmetic characters such as `/`, `*`, `-`, `+`; meanwhile, in non-switch and /p-switch case, they are allowed, even as leading or trailing characters.* \ No newline at end of file +- *When using the `/a` switch, leading and trailing whitespace characters of both, the variable name AND its value get ignored and whitespaces within a variable name is syntactically not allowed. Note that the latter is valid in the no-switch and `/p` cases. An arithmetic assignment usage without a variable name being stated is syntactically valid. Variable names during an arithmetic assignment must not contain typical arithmetic characters such as `/`, `*`, `-`, `+`; meanwhile, in non-switch and /p-switch case, they are allowed, even as leading or trailing characters.*