Empty program: Difference between revisions

add sed
(add sed)
Line 1,443:
An empty program is invalid because it gives an [Err: Undefined] error. This behaviour still applies when the program isn't running. Due to this error, a program containing only an empty comment is the smallest possible valid program.
<syntaxhighlight lang="scratchscript">//</syntaxhighlight>
 
=={{header|sed}}==
A totally empty program is valid, and just copies the input unmodified. The same effect can be achieved with a single ''b'' command (which might be more convenient when called from the command line).
<syntaxhighlight lang="sh">sed "" input.txt
# vs
sed b input.txt</syntaxhighlight>
 
=={{header|Seed7}}==
559

edits