Update a configuration file: Difference between revisions
m
→{{header|PowerShell}}
Line 1,669:
if ($FavouriteFruit)
{
$line = "
}
}
Line 1,676:
if ($NumberOfBananas)
{
$line = "
}
}
Line 1,683:
if ($NumberOfStrawberries)
{
$line = "
}
}
Line 1,690:
if ($NeedsPeeling -eq "On")
{
$line = "
}
elseif ($NeedsPeeling -eq "Off")
{
$line = ";
}
}
Line 1,701:
if ($SeedsRemoved -eq "On")
{
$line = "
}
elseif ($SeedsRemoved -eq "Off")
{
$line = ";
}
}
Line 1,725:
{{Out}}
<pre>
# This is a configuration file in standard configuration file format
#
# Lines begininning with a hash or a semicolon are ignored by the application
# program. Blank lines are also ignored by the application program.
# The first word on each non comment line is the configuration option.
# Remaining words or numbers on the line are configuration parameter
Line 1,737 ⟶ 1,742:
# This is a boolean that should be set
; NEEDSPEELING
# This boolean is commented out
SEEDSREMOVED
# How many bananas we have
# How many strawberries we have
</pre>
|