How to resolve the algorithm Take notes on the command line step by step in the Amazing Hopper programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Take notes on the command line step by step in the Amazing Hopper programming language
Table of Contents
Problem Statement
Invoking NOTES without commandline arguments displays the current contents of the local NOTES.TXT if it exists. If NOTES has arguments, the current date and time are appended to the local NOTES.TXT followed by a newline. Then all the arguments, joined with spaces, prepended with a tab, and appended with a trailing newline, are written to NOTES.TXT. If NOTES.TXT doesn't already exist in the current directory then a new NOTES.TXT file should be created.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Take notes on the command line step by step in the Amazing Hopper programming language
Source code in the amazing programming language
/*
Take notes on the command line. Rosettacode.org
*/
#include
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=""; obtener todos los parámetros, guardar en 'msg'
#( msg = strtran("@","\n\t",msg) )
fijar separador 'NULO'
fecha y hora, "\n\t", msg, "\n\n", unir esto;
añadir al final de ("NOTES.txt")
fin si
terminar
You may also check:How to resolve the algorithm Check output device is a terminal step by step in the Tcl programming language
You may also check:How to resolve the algorithm Dining philosophers step by step in the Racket programming language
You may also check:How to resolve the algorithm Kronecker product based fractals step by step in the Phix programming language
You may also check:How to resolve the algorithm Vector products step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Top rank per group step by step in the C++ programming language