Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,18 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Write_Whole_File is
|
||||
File_Name : constant String := "the_file.txt";
|
||||
|
||||
F : File_Type;
|
||||
begin
|
||||
begin
|
||||
Open (F, Mode => Out_File, Name => File_Name);
|
||||
exception
|
||||
when Name_Error => Create (F, Mode => Out_File, Name => File_Name);
|
||||
end;
|
||||
|
||||
Put (F, "(Over)write a file so that it contains a string. " &
|
||||
"The reverse of Read entire file—for when you want to update or " &
|
||||
"create a file which you would read in its entirety all at once.");
|
||||
Close (F);
|
||||
end Write_Whole_File;
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
contents: "Hello World!"
|
||||
write "output.txt" contents
|
||||
contents >> "output.txt"
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Overwrite.
|
||||
AUTHOR. Bill Gunshannon.
|
||||
INSTALLATION. Home.
|
||||
DATE-WRITTEN. 31 December 2021.
|
||||
************************************************************
|
||||
** Program Abstract:
|
||||
** Simple COBOL task. Open file for output. Write
|
||||
** data to file. Close file. Done...
|
||||
************************************************************
|
||||
|
||||
ENVIRONMENT DIVISION.
|
||||
|
||||
INPUT-OUTPUT SECTION.
|
||||
FILE-CONTROL.
|
||||
SELECT File-Name ASSIGN TO "File.txt"
|
||||
ORGANIZATION IS LINE SEQUENTIAL.
|
||||
DATA DIVISION.
|
||||
|
||||
FILE SECTION.
|
||||
|
||||
FD File-Name
|
||||
DATA RECORD IS Record-Name.
|
||||
01 Record-Name.
|
||||
02 Field1 PIC X(80).
|
||||
|
||||
WORKING-STORAGE SECTION.
|
||||
|
||||
01 New-Val PIC X(80)
|
||||
VALUE 'Hello World'.
|
||||
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
|
||||
Main-Program.
|
||||
OPEN OUTPUT File-Name.
|
||||
WRITE Record-Name FROM New-Val.
|
||||
CLOSE File-Name.
|
||||
STOP RUN.
|
||||
|
||||
END-PROGRAM.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import system'io;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
File.assign("filename.txt").saveContent("This file contains a string.")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Get-Process | Out-File -FilePath .\ProcessList.txt
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Set objFSO = CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
SourceFile = objFSO.GetParentFolderName(WScript.ScriptFullName) & "\out.txt"
|
||||
Content = "(Over)write a file so that it contains a string." & vbCrLf &_
|
||||
"The reverse of Read entire file—for when you want to update or create a file which you would read in its entirety all at once."
|
||||
|
||||
With objFSO.OpenTextFile(SourceFile,2,True,0)
|
||||
.Write Content
|
||||
.Close
|
||||
End With
|
||||
|
||||
Set objFSO = Nothing
|
||||
Loading…
Add table
Add a link
Reference in a new issue