PERIODIC-GROUP-VARIABLE(#J.#K) variable ?



Software AG's platform-independent programming language with full support for open-source and Internet applications

PERIODIC-GROUP-VARIABLE(#J.#K) variable ?

Postby diptisaini » Fri Oct 01, 2010 11:08 am

Hi,

Can anyone tell me what is the meaning of below statement ?

VIEW.PERIODIC-GROUP-VARIABLE(#J.#K)?
Where #j and #k are two (n2) variables.
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: PERIODIC-GROUP-VARIABLE(#J.#K) variable ?

Postby ats » Fri Oct 01, 2010 3:38 pm

This nothing but an array and it's index. Well, are the two varibales really separated by a DOT "." or a COLON ":"
like VIEW.PERIODIC-GROUP-VARIABLE(#J:#K)
ats
 
Posts: 14
Joined: Mon Sep 06, 2010 12:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: PERIODIC-GROUP-VARIABLE(#J.#K) variable ?

Postby RGZbrog » Sat Oct 02, 2010 6:13 pm

This is a rather obscure and, in my experience, seldom-used syntax. I haven't seen it used since the arrival of Natural 2 some 20 years ago. I would have to guess that its usage in Diptisaini's program is unnecessary.

The syntax is documented in
Programming Guide
. User-Defined Variables
. . Referencing a Database Array
. . . Referencing Arrays Defined with Variables

In the program's data definitions you will see two or more definitions of the same MU or PE field, each specifying a different range of occurrences, as in

02 PERIODIC-GROUP-VARIABLE (#I:#I+10)
02 PERIODIC-GROUP-VARIABLE (#J:#J+5)

To refer to these fields, Natural needs to know which range, and which occurrence within the range. The following line refers to the #Kth occurrence of the second range (the range beginning with #J).

VIEW.PERIODIC-GROUP-VARIABLE (#J.#K)

It is much clearer and simpler to define the field as a single range, and avoid the "#J." syntax.
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time


Return to Natural

 


  • Related topics
    Replies
    Views
    Last post