Truncate a file: Difference between revisions

Content added Content deleted
imported>Arakov
Line 578: Line 578:


=={{header|Elena}}==
=={{header|Elena}}==
ELENA 4.x:
ELENA 6.x:
<syntaxhighlight lang="elena">import system'io;
<syntaxhighlight lang="elena">import system'io;
import extensions;
import extensions;
Line 597: Line 597:
{
{
if (program_arguments.Length != 3)
if (program_arguments.Length != 3)
{ console.printLine:"Please provide the path to the file and a new length"; AbortException.raise() };
{ console.printLine("Please provide the path to the file and a new length"); AbortException.raise() };
auto file := File.assign(program_arguments[1]);
auto file := File.assign(program_arguments[1]);