Re: VMS Software Bootcamp 2024

Liste des GroupesRevenir à co vms 
Sujet : Re: VMS Software Bootcamp 2024
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 14. Sep 2024, 01:02:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc2jqd$1313l$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 9/13/2024 1:56 PM, Simon Clubley wrote:
On 2024-09-13, Arne Vajhøj <arne@vajhoej.dk> wrote:
They have now published the agenda:
>
https://events.vmssoftware.com/bootcamp-2024/agenda
 "Structured DCL Scripting". Hmmm... :-)
One does what one can do with the tools available.
DCL is not Python or VBS.
But one can do some things:
* split logic up in subroutines
* have a convention for how to do loops using goto
* have a convention for how to simulate arrays
* indentation
* self explanatory names
* comments
* etc.
Example (whether it is a good or bad example that I will leave
to the reader):
$! p1 = file name
$ file_name = p1
$ call read_file 'file_name' "nline" "line"
$ call dump "Before sort:" 'nline' "line"
$ call o2sort 'nline' "line"
$ call dump "After sort:" 'nline' "line"
$ exit
$!
$ read_file: subroutine ! p1 = file name, p2 = name of global variable holding number of lines, p3 = name of global variable holding
  lines
$ file_name = p1
$ nline = p2
$ line = p3
$ open/read inputfile 'file_name'
$ n = 0
$ file_read_loop:
$     read/end=end_file_read_loop inputfile temp
$     'line'_'n' == temp
$     n = n + 1
$     goto file_read_loop
$ end_file_read_loop:
$ 'nline' == n
$ close inputfile
$ return
$ endsubroutine
$!
$ dump: subroutine ! p1 = description, p2 = number lines, p3 = name of global variable holding lines
$ description = p1
$ nline = p2
$ line = p3
$ write sys$output description
$ i = 0
$ dump_loop:
$     if i .ge. nline then goto end_dump_loop
$     write sys$output 'line'_'i'
$     i = i + 1
$     goto dump_loop
$ end_dump_loop:
$ return
$ endsubroutine
$!
$ o2sort: subroutine ! p1 = number lines, p2 = name of global variable holding lines
$ nline = p1
$ line = p2
$ i = 0
$ sort_outer_loop:
$     if i .ge. nline then goto end_sort_outer_loop
$     j = i + 1
$     sort_inner_loop:
$         if j .ge. nline then goto end_sort_inner_loop
$         if 'line'_'i' .gts. 'line'_'j'
$         then
$             temp = 'line'_'i'
$             'line'_'i' == 'line'_'j'
$             'line'_'j' == temp
$         endif
$         j = j + 1
$         goto sort_inner_loop
$     end_sort_inner_loop:
$     i = i + 1
$     goto sort_outer_loop
$ end_sort_outer_loop:
$ return
$ endsubroutine
Arne

Date Sujet#  Auteur
6 Sep 24 * VMS Software Bootcamp 202432William Cox
13 Sep 24 `* Re: VMS Software Bootcamp 202431Arne Vajhøj
13 Sep 24  +* Re: VMS Software Bootcamp 202429Simon Clubley
13 Sep 24  i+* Re: VMS Software Bootcamp 202423Robert A. Brooks
13 Sep 24  ii`* Re: VMS Software Bootcamp 202422Chris Townley
16 Sep 24  ii `* Re: VMS Software Bootcamp 202421Simon Clubley
16 Sep 24  ii  +* Re: VMS Software Bootcamp 20242Arne Vajhøj
16 Sep 24  ii  i`- Re: VMS Software Bootcamp 20241Chris Townley
17 Sep 24  ii  `* Re: VMS Software Bootcamp 202418Tom Wade
18 Sep 24  ii   `* Re: VMS Software Bootcamp 202417Arne Vajhøj
18 Sep 24  ii    +* Re: VMS Software Bootcamp 202415Lawrence D'Oliveiro
18 Sep 24  ii    i+* Re: VMS Software Bootcamp 20245Arne Vajhøj
18 Sep 24  ii    ii`* Re: VMS Software Bootcamp 20244Lawrence D'Oliveiro
18 Sep 24  ii    ii `* Re: VMS Software Bootcamp 20243Arne Vajhøj
18 Sep 24  ii    ii  `* Re: VMS Software Bootcamp 20242Lawrence D'Oliveiro
18 Sep 24  ii    ii   `- Re: VMS Software Bootcamp 20241Arne Vajhøj
18 Sep 24  ii    i`* Re: VMS Software Bootcamp 20249Tom Wade
18 Sep 24  ii    i +* Re: VMS Software Bootcamp 20243Arne Vajhøj
18 Sep 24  ii    i i+- Re: VMS Software Bootcamp 20241Arne Vajhøj
19 Sep 24  ii    i i`- Re: VMS Software Bootcamp 20241Tom Wade
19 Sep 24  ii    i `* Re: VMS Software Bootcamp 20245Simon Clubley
25 Sep 24  ii    i  `* Re: VMS Software Bootcamp 20244Arne Vajhøj
25 Sep 24  ii    i   +* Re: VMS Software Bootcamp 20242Simon Clubley
25 Sep 24  ii    i   i`- Re: VMS Software Bootcamp 20241Arne Vajhøj
26 Sep 24  ii    i   `- Re: VMS Software Bootcamp 20241Stephen Hoffman
18 Sep 24  ii    `- Re: VMS Software Bootcamp 20241Arne Vajhøj
14 Sep 24  i`* Re: VMS Software Bootcamp 20245Arne Vajhøj
14 Sep 24  i +- Re: VMS Software Bootcamp 20241abrsvc
14 Sep 24  i `* Re: VMS Software Bootcamp 20243Lawrence D'Oliveiro
14 Sep 24  i  +- Re: VMS Software Bootcamp 20241Craig A. Berry
15 Sep 24  i  `- Re: VMS Software Bootcamp 20241Arne Vajhøj
27 Sep 24  `- Re: VMS Software Bootcamp 20241Arne Vajhøj

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal