This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
See this idea on ideas.ibm.com
Statements like IF - ELSE - ENDIF, SELECT, LOOPs should have tag (or Id) assigned to the beginning and end (and if required in between).
Example:
/Free
IF#1: IF (cond1)
{ Set-of-statements;}
IF#1-1: IF (inner-condition 1)
{ Set-of-statements;}
IF#1-2: IF (inner-condition 2)
{ Set-of-statements;}
IF#1-2: ENDIF
IF#1-1: ENDIF
{ Set-of-statements;}
IF#1: ELSE
{ Set-of-statements;}
IF#1-3: IF (inner-condition 3)
{ Set-of-statements;}
IF#1-3: ENDIF
IF#Cond4: IF (inner-condition 4)
{ Set-of-statements;}
IF#Cond4: ENDIF
IF#PrtIsY: IF (inner-condition 5)
{ Set-of-statements;}
IF#PrtIsY: ENDIF
IF#1: ENDIF
/End-Free
The Tag will make the analysis work much easier - either manual or by means of an analysis tool. It helps identify the end of such blocks and track scope of variables inside etc.
I know that the compiler output (spool file) could generate indentation (probably with a pipe | symbol) but yet we need this.
In fact, Tagging should be made mandatory for such conditional statements.
Tag name should be allowed a minimum of 10 characters and its prefix should be a reserved (fixed) one - TAG, TG#, T#, IF#, DO# etc. (any or all of these could be allowed) and the rest could be anything meaningful & logical.
Compiler too can issue error/warning messages if the TAGs are out of order, if a TAG misses its pair, if duplicate tag names coded etc.
Idea priority | Medium |
By clicking the "Post Comment" or "Submit Idea" button, you are agreeing to the IBM Ideas Portal Terms of Use.
Do not place IBM confidential, company confidential, or personal information into any field.
If you really, really want to do this, you can do it today, just place the tags as comments after the source line:
IF (cond1); // IF#1
{ Set-of-statements;}
IF (inner-condition 1); // IF#1-1
{ Set-of-statements;}
ENDIF; // IF#1-1
ENDIF; // IF#1
Personally, I think indenting the source is a better way of showing conditional blocks of code.
The compile listing has a column that indicates the nesting level of every statement in a structured group.
- B indicates the beginning of the group.
- E indicates the end of the group.
- X indicates a statement in the structured group such as ELSE, or WHEN, or ON-ERROR
- Ordinary statements within the group just have the nesting level number
- Statements that are not in a group do not have anything in this column of the listing
if 1 = 1; B01
if 2 = 2; B02
return; 02
endif; E02
return; 01
else; X01
return; 01
endif; E01
return;
- IBM Power Systems Development