Conditional structures: Difference between revisions
→{{header|Ed}}: Fix syntax and punctuation
(Add Ed conditionals) |
(→{{header|Ed}}: Fix syntax and punctuation) |
||
Line 2,505:
=={{header|Ed}}==
Note that ed, unlike more advanced [[Sed]], has no conditional branching. Still, conditionals can be simulated with global match/no-match rules:
<syntaxhighlight
g/True/s//It's true!/p
v/True/s/.*/It's false!/p
|