RosettaCodeData/Task/Take-notes-on-the-command-line/FreeBASIC/take-notes-on-the-command-line.basic

21 lines
465 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
If Len(Command) Then
Open "notes.txt" For Append As #1
Print #1, Date, Time
Print #1, Chr(9); Command
Close
Else
If Open("notes.txt" For Input As #1) = 0 Then
Dim As String lin
Print "Contenido del archivo:"
Do While Not Eof(1)
Line Input #1, lin
Print lin
Loop
Else
Open "notes.txt" For Output As #1
Print "Archivo 'NOTES.TXT' creado"
End If
End If
Close #1
Sleep