Take notes on the command line: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (→{{header|REXX}}: Refurbished and rexx notes ? added) |
imported>Thebeez |
||
Line 3,227: | Line 3,227: | ||
=={{header|uBasic/4tH}}== |
=={{header|uBasic/4tH}}== |
||
{{works with| |
{{works with|R4}} |
||
The lack of built-in high level time and date functions makes it more difficult than necessary, since they have to be implemented by user defined functions. |
The lack of built-in high level time and date functions makes it more difficult than necessary, since they have to be implemented by user defined functions. |
||
<syntaxhighlight lang="text">If Cmd (0) > 1 Then ' if there are commandline arguments |
<syntaxhighlight lang="text">If Cmd (0) > 1 Then ' if there are commandline arguments |
||
Line 3,280: | Line 3,280: | ||
g@ = g@ - FUNC(_Monthdays (c@-1, f@)) |
g@ = g@ - FUNC(_Monthdays (c@-1, f@)) |
||
' Print a@, d@, e@, f@ |
' Print a@, d@, e@, f@ |
||
Return (Join (Str(b@), FUNC(_Format (c@, |
Return (Join (Str(b@), FUNC(_Format (c@, "-")), FUNC(_Format (e@ - g@, "-")))) |
||
_TimeStr ' convert epoch to time string |
_TimeStr ' convert epoch to time string |
||
Param (1) |
Param (1) |
||
Return (Join(Str((a@%86400)/3600), FUNC(_Format ((a@%3600)/60, |
Return (Join(Str((a@%86400)/3600), FUNC(_Format ((a@%3600)/60, ":")), FUNC(_Format (a@%60, ":")))) |
||
_Format Param (2) : Return (Join (Iif (a@<10, Join(b@, "0"), b@), Str (a@))) |
_Format Param (2) : Return (Join (Iif (a@<10, Join(b@, "0"), b@), Str (a@))) |
||
Line 3,297: | Line 3,297: | ||
Anyways, it seems this task is DONE! |
Anyways, it seems this task is DONE! |
||
</pre> |
</pre> |
||
=={{header|UNIX Shell}}== |
=={{header|UNIX Shell}}== |
||
Bash version |
Bash version |