Anonymous user
File size distribution: Difference between revisions
→{{header|REXX}}: added support for an alternative comma, added a programming note (before the output section).
m (added a ;Task: section header, added whitespace before the table-of-contents (TOC), separated suggestions and a query from the task's requirements..) |
(→{{header|REXX}}: added support for an alternative comma, added a programming note (before the output section).) |
||
Line 430:
_=linein(dirOUT); if left(_, 1)==' ' then iterate /*process data. */
parse upper var _ dat tim sz . /*uppercase suffix*/
if pos('
if
▲ sz=# * 1024 **pos(sfx,'KMGT')/1 /*compute true val*/
end
$=$ + sz /*keep a running total for the filesize*/
Line 468 ⟶ 467:
/*──────────────────────────────────────────────────────────────────────────────────────*/
commas: parse arg _; do jc=length(_)-3 to 1 by -3; _=insert(',', _, jc); end; return _</lang>
This REXX program makes use of '''LINESIZE''' REXX program (or BIF) which is used to determine the screen width (or linesize) of the terminal (console).
<br>The '''LINESIZE.REX''' REXX program is included here ──► [[LINESIZE.REX]].<br>
{{out|output|text= when using the default input: (which in this case was the '''C:''' drive.)}}
<pre>
|