Skip to Main Content
Due to the recent acquisition by IBM, the Adabas & Natural Ideas Portal does not contain ideas from products ApplinX and EntireX any longer. Please refer to the IBM Ideas Portal for these products from now on (IBMid required). Existing content will be migrated during the next few weeks.
Status Planned
Workspace NaturalONE
Categories NaturalONE (ONE)
Created by Hezi Shirazi
Created on Jul 15, 2021

Struct more features



Hello,


Indentation is very useful in any programming language.

We are using the Natural command "struct" to indent our Natural modules.

However, we would like it to have more options.

For example, the current STRUCT command result:

DEFINE DATA

LOCAL

1 #a (a010)

1 redefine #a

2 #a1 (n10)

Local using lda001l

End-define

On Error

Escape module

End-error

Perform hello

Define subroutine hello

If #a1 <> 0

Write "Hello World"

End-if

End-subroutine

However, the desired STRUCT command result should look like this:

DEFINE DATA

LOCAL

1 #a (a010)

1 redefine #a

2 #a1 (n10)

Local using lda001l

End-define

On Error

Escape module

End-error

Perform hello

Define subroutine hello

If #a1 <> 0

Write "Hello World"

End-if

End-subroutine

In General, the change I am looking for, is that the first command line, after the module definition, will also be indent.

This is how other languages, like Python, are working.


It is clear that it is not possible to change the functionality of the "STRUCT" command that is in use by many customers.

However, it will be great to have a parameter to control the behavior of STRUCT.



Can this be done?



Use Case Natural indentation should be similar to other languages, such as python.
Created on Brainstorm 05/02/2019 04:16
Brainstorm ID 6992
  • +1