Author Topic: REXX - Top header comments Suggestion  (Read 688 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 607
  • -Receive: 122
  • Posts: 3296
  • Karma: +27/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
REXX - Top header comments Suggestion
« on: August 24, 2021, 03:41:03 pm »
Hi

I know this is a thing of personal taste, but can you please recommend a good "comment header" for REXX scripts.

For example I liked this one:
Code: [Select]
/* REXX */
/* Title : Meteor                                           */
/* Desc  : A simple action game                             */
/* Author: Jeff Byrd, jeff.byrd@xxxxxx.vanderbilt.xxx       */
/* Date  : 12/22/95                                         */
/*                                                          */
/* Notes : If you run this program from a mapped network    */
/*         drive, the high score list and demos will be     */
/*         shared among all the players.                    */
/*         Make sure to note all the hints on how to play.  */
/*         To clear the high score/demo list, delete all    */
/*         *.MSV files.                                     */

Any other layout that you like or recommend for the REXX scripts?

Regards
« Last Edit: August 24, 2021, 03:45:35 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 716
  • Karma: +11/-0
    • View Profile
Re: REXX - Top header comments Suggestion
« Reply #1 on: August 24, 2021, 04:14:07 pm »
I use the headers Christian has created for several filetypes.

The REXX header prototype is header.cmd_rex. An example is icons.cmd. (SVN would have expanded the $Id$ line. Trac as well, but it refuses to display .cmd files.)

An example for another header I've used for another project is:
Code: [Select]
/****************************************************************************
* pmcall.cmd
*
* Version: 2019-08-11
*
* Syntax: pmcall.exe  [-m] [-b] [-l <log_file>] <cmd_name> [<cmd_args>]
*
*    -m  Messages enabled (STDOUT and STDERR/PM)
*    -b  Error beeps enabled
*    -l  Logging enabled
*    -h, -?  Show help message
*
* Provide a PM environment for .cmd files.
*
* o  It opens a queue, whose name is provided as env var 'ERRORQUEUE'.
* o  It executes the submitted cmd_name and its args.
* o  After execution of cmd_name, It reads the contents of ErrorQueue and
*    presents it in a PM message box. This is useful in cases where messages
*    would be lost otherwise.
* o  This is compiled to a PM executable to make the submitted cmd_name run
*    in a PM env: REXX2EXE /P [/K] pmcall.cmd pmcall.exe
*
* Part of the DOSBox installation. May also be used for other cases.
*
* By Andreas Schnellbacher <mailto:###>
* Contains REXX code from the NEPMD project.
****************************************************************************/
« Last Edit: August 24, 2021, 09:42:10 pm by Andreas Schnellbacher »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 15
  • -Receive: 32
  • Posts: 985
  • Karma: +21/-0
    • View Profile
Re: REXX - Top header comments Suggestion
« Reply #2 on: August 25, 2021, 04:24:12 am »
Here is what I use:

Code: [Select]
/*------------------------- New Concepts Consulting --------------------------
- Application Module Name : WPS
- File Name               : folder_refresh.cmd
- Date                    : April 12, 2020
- Author                  : Dariusz Piatkowski
-                                                                             
- Description:                                                                 
- There occasionally arises a need to force a refresh of a folder. This is
- intended to make sure that WPS is aware of any changes that have occured at
- a filesystem level, such as: adding or deleting an object (file or folder).
-
- There are a couple of alternative approaches to use here:                 
- 1) follow the approach implemented here, call this REXX script 
-    as follows: 'refresh_folder.cmd fully_qualified_folder_path'                 
- 2) utilize an existing utility such as OO.EXE and issue a call 
-    to list the contents of a folder but do not create output, as follows:
-    'oo.exe /L folder_name > nul'
-                                                                 
- Both will force the WPS to refresh the folder contents.
-
- Parameters:
- INPUT => fully qualified folder path
-
- Modification History
-
-    REVISON        DATE/TIME         AUTHOR
-
-   Rev 1.0.0  APR 12, 2020 17:05:00   Dariusz Piatkowski
- First version of the code.
-
-   Rev 1.0.1  APR 18, 2020 18:35:00   Dariusz Piatkowski
- Added the check for a valid INPUT parameter, if not found RETURN error.
-
------------------------------------------------------------------------------*/

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 607
  • -Receive: 122
  • Posts: 3296
  • Karma: +27/-0
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: REXX - Top header comments Suggestion
« Reply #3 on: August 30, 2021, 04:04:15 pm »
Thanks for sharing the samples. Both look better than the one I found.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.