FORTRAN Computer Games


Buzzword

A buzzword phrases generator, originally written by David H. Ahl for his book BASIC Computer Games (1978):

This program is an invaluable aid for preparing speeches and briefings about educational technology. This buzzword generator provides sets of three highly-acceptable words to work into your material. Your audience will never know that the phrases don’t really mean much of anything because they sound so great! Full instructions for running are given in the program.

The port to FORTRAN 77 is more or less a direct translation of the BASIC program.

Gameplay

Buzzword in FORTRAN 77

Functions & Subroutines

The program requires three procedures that are not part of the ANSI/ISO FORTRAN 77 language standard:

RESULT = TIME()
Returns timestamp in seconds (INTEGER). Required for the initialisation of the pseudo-random number generator.
RESULT = RAND(I)
Returns the next random number (REAL).
CALL SRAND(ISEED)
Initialises the pseudo-random number generator with given seed value (INTEGER).

Most modern compilers provide these through extensions.

Program Listing

Save the program source as buzz.f.

C     ******************************************************************
C
C     BUZZWORD
C
C     THIS PROGRAM OUTPUTS BUZZWORD PHRASES. ORIGINAL BASIC VERSION BY
C     DAVID H. AHL, 1978. PORT TO FORTRAN 77 BY PHILIPP ENGEL, 2022.
C
C     ******************************************************************
      PROGRAM BUZZ
      CHARACTER    A
      CHARACTER*15 WORDS(39)
      INTEGER      I, J, K
      INTEGER      ISTAT

      DATA WORDS /
     &'ABILITY',         'BASAL',          'BEHAVIORAL',
     &'CHILD-CENTERED',  'DIFFERENTIATED', 'DISCOVERY',
     &'FLEXIBLE',        'HETEROGENEOUS',  'HOMOGENEOUS',
     &'MANIPULATIVE',    'MODULAR',        'TAVISTOCK',
     &'INDIVIDUALIZED',  'LEARNING',       'EVALUATIVE',
     &'OBJECTIVE',       'COGNITIVE',      'ENRICHMENT',
     &'SCHEDULING',      'HUMANISTIC',     'INTEGRATED',
     &'NON-GRADED',      'TRAINING',       'VERTICAL AGE',
     &'MOTIVATIONAL',    'CREATIVE',       'GROUPING',
     &'MODIFICATION',    'ACCOUNTABILITY', 'PROCESS',
     &'CORE CURRICULUM', 'ALGORITHM',      'PERFORMANCE',
     &'REINFORCEMENT',   'OPEN CLASSROOM', 'RESOURCE',
     &'STRUCTURE',       'FACILITY',       'ENVIRONMENT'/

      CALL SRAND(TIME())

      PRINT 100

   10 CONTINUE
      I = 13 * RAND(0) + 1
      J = 13 * RAND(0) + 14
      K = 13 * RAND(0) + 27
      PRINT 200, WORDS(I), WORDS(J), WORDS(K)
      PRINT 300
      READ (*, 400, IOSTAT=ISTAT) A
      IF (ISTAT == 0 .AND. (A == 'Y' .OR. A == 'y')) GOTO 10

      PRINT 500

  100 FORMAT (26X,' BUZZWORD GENERATOR',/,15X,' CREATIVE COMPUTING',1X,
     &' MORRISTOWN, NEW JERSEY',/,/,
     &' THIS PROGRAM PRINTS HIGHLY ACCEPTABLE PHRASES IN',/,
     &' "EDUCATOR-SPEAK" THAT YOU CAN WORK INTO REPORTS',/,
     &' AND SPEECHES.  WHENEVER A QUESTION MARK IS PRINTED,',/,
     &' TYPE A "Y" FOR ANOTHER PHRASE OR "N" TO QUIT.',/,/,
     &' HERE''S THE FIRST PHRASE:')
  200 FORMAT (/,3(1X,A),/)
  300 FORMAT ('? ',$)
  400 FORMAT (A)
  500 FORMAT (' COME BACK WHEN YOU NEED HELP WITH ANOTHER REPORT!')
      END

Build Instructions

UNIXFlang/F18$ flang -o buzz buzz.f
GNU Fortran$ gfortran -o buzz buzz.f
Intel Fortran Compiler$ ifort -o buzz buzz.f
Win32Digital/Compaq Visual Fortran> fl32.exe buzz.f /Fe=buzz.exe

References


Home