Anonymous user
Update a configuration file: Difference between revisions
m
added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added other whitespace to the task's preamble, corrected some misspellings.
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added other whitespace to the task's preamble, corrected some misspellings.) |
|||
Line 1:
{{task|File handling}}
We have a configuration file as follows:
# This is a configuration file in standard configuration file format
#
# Lines
# program. Blank lines are also ignored by the application program.
Line 34 ⟶ 35:
* Enable (or create if it does not exist in the file) a parameter for numberofstrawberries with a value of 62000
<br>
Note that configuration option names are not case sensitive. This means that changes should be effected, regardless of the case.
Line 46 ⟶ 48:
The update should rewrite configuration option names in capital letters. However lines beginning with hashes and any parameter data must not be altered (eg the banana for favourite fruit must not become capitalized). The update process should also replace double semicolon prefixes with just a single semicolon (unless it is uncommenting the option, in which case it should remove all leading semicolons).
Any lines beginning with a semicolon or groups of semicolons, but no following option should be removed, as should any leading or trailing whitespace on the lines. Whitespace between the option and
space, and any non
(other than end of line markers), should also be removed.
* [[Read a configuration file]]
<br><br>
=={{header|AutoHotkey}}==
|