Jump to content

Start from a main routine: Difference between revisions

Add sed using 1 { ... }.
m ({{omit from|Brlcad}})
(Add sed using 1 { ... }.)
Line 27:
 
* Right click the MMain module, then select Startup class from the context menu
 
=={{header|sed}}==
A <code>sed</code> program repeats itself for each line of input, but your program can begin with commands that address line 1. (This requires that your input has a line 1. If your input is empty file, like <code>/dev/null</code>, then it is impossible to run commands.)
 
<lang sed># This code runs only for line 1.
1 {
i\
Explain-a-lot processed this file and
i\
replaced every period with three exclamation points!!!
i\
 
}
 
# This code runs for each line of input.
s/\./!!!/g</lang>
 
=={{header|Visual Basic}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.