Take notes on the command line: Difference between revisions
Content added Content deleted
imported>Thebeez |
|||
Line 598: | Line 598: | ||
f.byte('\n'); |
f.byte('\n'); |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|Amazing Hopper}}== |
|||
<syntaxhighlight lang="c"> |
|||
/* |
|||
Take notes on the command line. Rosettacode.org |
|||
*/ |
|||
#include <basico.h> |
|||
algoritmo |
|||
cuando ' no existe el archivo ("NOTES.txt") ' { |
|||
sys = `touch NOTES.txt`; luego limpiar 'sys' |
|||
} |
|||
si ' total argumentos es (1) ' |
|||
cargar cadena desde ("NOTES.txt"); luego imprime |
|||
sino |
|||
msg="", fd=0 |
|||
obtener todos los parámetros, guardar en 'msg' |
|||
#( msg = strtran("@","\n\t",msg) ) |
|||
abrir para añadir ( "NOTES.txt", fd ) e ir al final(fd) |
|||
fijar separador 'NULO' |
|||
fecha y hora, "\n\t", msg, "\n\n", unir esto |
|||
escribir en 'fd' |
|||
cerrar archivo ' fd ' |
|||
fin si |
|||
terminar |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
: |
|||
: |
|||
$ hopper3 basica/notes.bas otra y otra y otra...@y otra |
|||
$ hopper3 basica/notes.bas |
|||
27/11/2023,23:38:28:74 |
|||
iniciando estas notas con un mensaje |
|||
de prueba |
|||
27/11/2023,23:40:57:41 |
|||
nota 2: |
|||
establecer parámetro |
|||
27/11/2023,23:52:22:82 |
|||
nueva nota de prueba |
|||
ta es medianoche |
|||
27/11/2023,23:55:07:20 |
|||
otra nueva nota |
|||
27/11/2023,23:56:21:15 |
|||
otra y otra y otra... |
|||
y otra |
|||
$ hopper3 basica/notes.bas borrar todo de este directorio@sin asco |
|||
$ hopper3 basica/notes.bas |
|||
27/11/2023,23:38:28:74 |
|||
iniciando estas notas con un mensaje |
|||
de prueba |
|||
27/11/2023,23:40:57:41 |
|||
nota 2: |
|||
establecer parámetro |
|||
27/11/2023,23:52:22:82 |
|||
nueva nota de prueba |
|||
ta es medianoche |
|||
27/11/2023,23:55:07:20 |
|||
otra nueva nota |
|||
27/11/2023,23:56:21:15 |
|||
otra y otra y otra... |
|||
y otra |
|||
28/11/2023,00:04:04:62 |
|||
borrar todo de este directorio |
|||
sin asco |
|||
$ |
|||
</pre> |
|||
=={{header|APL}}== |
=={{header|APL}}== |