Input/Output for lines of text: Difference between revisions
Content added Content deleted
Line 357: | Line 357: | ||
for i = 1, numLines do table.insert(lineTable, io.read()) end |
for i = 1, numLines do table.insert(lineTable, io.read()) end |
||
show(lineTable)</lang> |
show(lineTable)</lang> |
||
=={{header|Objeck}}== |
|||
<lang objeck>use System.IO.File; |
|||
class Rosetta { |
|||
function : Main(args : String[]) ~ Nil { |
|||
in : FileReader; |
|||
leaving { |
|||
if(in <> Nil) { |
|||
in->Close(); |
|||
}; |
|||
}; |
|||
if(args->Size() = 1) { |
|||
in := FileReader->New(args[0]); |
|||
i := in->ReadString()->ToInt(); |
|||
while(i-- <> 0) { |
|||
in->ReadString()->PrintLine(); |
|||
}; |
|||
}; |
|||
} |
|||
}</lang> |
|||
=={{header|PARI/GP}}== |
=={{header|PARI/GP}}== |