A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/fyi/domains/anna.fyi/public_html/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/fyi/domains/anna.fyi/public_html/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/fyi/domains/anna.fyi/public_html/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/fyi/domains/anna.fyi/public_html/index.php
Line: 315
Function: require_once

Sample Program - Pastebin courtesy of Miss Anna

Sample Program

From Glow, 2 Years ago, written in COBOL, viewed 275 times.
URL https://anna.fyi/view/49cb801b Embed
Download Paste or View Raw
  1. $ SET SOURCEFORMAT"FREE"
  2. IDENTIFICATION DIVISION.
  3. PROGRAM-ID.  SeqWrite.
  4. AUTHOR.  Michael Coughlan.
  5. * Example program showing how to create a sequential file
  6. * using the ACCEPT and the WRITE verbs.
  7. * Note: In this version of COBOL pressing the Carriage Return (CR)
  8. * without entering any data results in StudentDetails being filled
  9. * with spaces.
  10.  
  11.  
  12. ENVIRONMENT DIVISION.
  13. INPUT-OUTPUT SECTION.
  14. FILE-CONTROL.
  15.     SELECT StudentFile ASSIGN TO "STUDENTS.DAT"
  16.                 ORGANIZATION IS LINE SEQUENTIAL.
  17.  
  18. DATA DIVISION.
  19. FILE SECTION.
  20. FD StudentFile.
  21. 01 StudentDetails.
  22.    02  StudentId       PIC 9(7).
  23.    02  StudentName.
  24.        03 Surname      PIC X(8).
  25.        03 Initials     PIC XX.
  26.    02  DateOfBirth.
  27.        03 YOBirth      PIC 9(4).
  28.        03 MOBirth      PIC 9(2).
  29.        03 DOBirth      PIC 9(2).
  30.    02  CourseCode      PIC X(4).
  31.    02  Gender          PIC X.
  32.  
  33. PROCEDURE DIVISION.
  34. Begin.
  35.     OPEN OUTPUT StudentFile
  36.     DISPLAY "Enter student details using template below.  Enter no data to end."
  37.  
  38.     PERFORM GetStudentDetails
  39.     PERFORM UNTIL StudentDetails = SPACES
  40.        WRITE StudentDetails
  41.        PERFORM GetStudentDetails
  42.     END-PERFORM
  43.     CLOSE StudentFile
  44.     STOP RUN.
  45.  
  46. GetStudentDetails.
  47.     DISPLAY "Enter - StudId, Surname, Initials, YOB, MOB, DOB, Course, Gender"
  48.     DISPLAY "NNNNNNNSSSSSSSSIIYYYYMMDDCCCCG"
  49.     ACCEPT  StudentDetails.  

Reply to "Sample Program"

Here you can reply to the paste above