Browse Prior Art Database

Add Names to APL2 Argument Patterns for Better Reference

IP.com Disclosure Number: IPCOM000109058D
Original Publication Date: 1992-Jul-01
Included in the Prior Art Database: 2005-Mar-23
Document File: 2 page(s) / 60K

Publishing Venue

IBM

Related People

Beaty, KA: AUTHOR [+2]

Abstract

This article deals with the problem of how to map APL2* data variables to an external data structure as far as naming definitions are concerned. The basic APL2 data-type for mixed data is the nested array. A nested array can hold any amount of data, of any form, including other, subsidiary nested arrays. However, all items are referred to by their index location in the array. This is contrary to the usage when defining data structures in most programming languages, where each part of the structure will have a member-name that can be used when referring to a specific sub-section of the data. If APL2 is to use data structures defined externally, it becomes a near-requirement that it must also have a way of defining these member-names. This article suggests how this can be accomplished.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Add Names to APL2 Argument Patterns for Better Reference

       This article deals with the problem of how to map APL2*
data variables to an external data structure as far as naming
definitions are concerned.  The basic APL2 data-type for mixed data
is the nested array.  A nested array can hold any amount of data, of
any form, including other, subsidiary nested arrays.  However, all
items are referred to by their index location in the array.  This is
contrary to the usage when defining data structures in most
programming languages, where each part of the structure will have a
member-name that can be used when referring to a specific sub-section
of the data.  If APL2 is to use data structures defined externally,
it becomes a near-requirement that it must also have a way of
defining these member-names.  This article suggests how this can be
accomplished.

      The first part of the solution is to add the member name to the
APL2 structure definition pattern.  This makes the pattern look like:
      total-length  type  rank  dimensions  name

      The only new item here is the name attribute.  It can be
omitted, or it can be a valid APL2 name.

      Secondly, there must be an ability to load the member-names of
a given structure into APL2 upon request, assigning them their
correct, matching index positions. This way, a given element can be
referred to in the APL2 application in an equivalent way to a
compiled language's approach.

     ...