Anonymous user
File size: Difference between revisions
m
→{{header|REXX}}: aligned the output for the two input files, reduced the CHARIN size to allow PC/REXX and Personal REXX to execute.
m (→{{header|REXX}}: aligned the output for the two input files, reduced the CHARIN size to allow PC/REXX and Personal REXX to execute.) |
|||
Line 1,171:
=={{header|REXX}}==
===MS DOS version 1===
This REXX example was executed on a Windows/XP and also a Windows 7 system (in a DOS ''window'')
<br>it reports the file's size (in bytes) for both of the required files.
Various REXXes were used for testing: '''Regina, PERSONAL REXX, PC/REXX,''' and '''R4'''.
<br>Note that some operating systems don't have a concept of a ''current directory'' or a ''file system root''. ▼
<lang rexx>/*REXX program verifies a file's size (by reading all the lines) in current dir & root.*/▼
▲
▲<lang rexx>/*REXX program
parse arg iFID . /*allow the user specify the file ID. */
if iFID=='' | iFID=="," then iFID='
say 'size of
say 'size of \..\'iFID "="
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
end /*while*/;
▲ return $</lang>
▲'''output''' when using the default input:
<pre>
size of
size of \..\
</pre>
Line 1,216 ⟶ 1,218:
Note that CMS hasn't a concept of a ''root''.
<br>Also note that the CMS system doesn't normally support the use of periods ('''.'''); it uses blanks instead.
<lang rexx>/*REXX program
parse arg iFID
if iFID=='' | iFID=="," then iFID= '
say 'size of' iFID "="
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
end
▲ return $</lang>
=={{header|Ring}}==
|