Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
10
Task/File-input-output/REXX/file-input-output-1.rexx
Normal file
10
Task/File-input-output/REXX/file-input-output-1.rexx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*REXX program to read a file and store the contents into an output file*/
|
||||
iFID = 'input.txt' /*name of the input file. */
|
||||
oFID = 'output.txt' /*name of the output file. */
|
||||
call lineout oFID,,1 /*insure output starts at line 1.*/
|
||||
|
||||
do while lines(iFID)\==0 /*read records until finished. */
|
||||
y = linein(iFID) /*read a record from input. */
|
||||
call lineout oFID,y /*write a record to output. */
|
||||
end /*while ···*/
|
||||
/*stick a fork in it, we're done.*/
|
||||
8
Task/File-input-output/REXX/file-input-output-2.rexx
Normal file
8
Task/File-input-output/REXX/file-input-output-2.rexx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/*REXX program to read a file and write contents to an output file*****
|
||||
* 03.09.2012 Walter Pachl (without erase string would be appended)
|
||||
**********************************************************************/
|
||||
ifid='input.txt' /*name of the input file. */
|
||||
ofid='output.txt' /*name of the output file. */
|
||||
'erase' ofid /* avoid appending */
|
||||
s=charin(ifid,,1000000) /* read the input file */
|
||||
Call charout ofid,s /* write to output file */
|
||||
Loading…
Add table
Add a link
Reference in a new issue