Take notes on the command line: Difference between revisions

m
→‎{{header|REXX}}: changed/added comments and whitespace, changed indentations.
(Added Elixir)
m (→‎{{header|REXX}}: changed/added comments and whitespace, changed indentations.)
Line 1,683:
 
=={{header|REXX}}==
<lang rexx>/*REXX program implements the "NOTES" command (append text to a file from the C.L.).*/
timestamp=right(date(),11,0) time() date('W') /*create a (current) date/ & time stamp.*/
nFID = 'NOTES.TXT' /*the fileID of the "notes" file. */
 
if 'f0f2'x==02 then tab='"05'"x /*this is an EBCDIC system. */
else tab='"09'"x /* " " " ASCII " */
 
if arg()==0 then do while lines(nFID) /*No argsarguments? Then showdisplay the file. */
say linein(Nfid) /*showdisplay a line of file ──► screen. */
end /*while*/
else do
call lineout nFID,timestamp /*append the timestamp. to "notes" file.*/
call lineout nFID,tab||arg(1) /*append the "note " text " " " */
end
/*stick a fork in it, we're all done. */</lang>
 
=={{header|Ruby}}==