Conversation
|
You have |
Hi @bobcozzi,
Let me know if I missed anything. |
|
Thank you! I see that now. Are you supporting fixed-format as well? I am asking because this line: contains fixed-format opcode. Thus replicating the Also, have you considered seeing if you can support RPG IV Conditional Compiler Directive? |
Hi @bobcozzi I didn't unserstand what you mean with "Thus replicating the For /IF and so on, I see that highlighting and foldinf is already supported: |
|
Just poking around, so I may be way off base. But don't you need to consider |
I suppose if Developers still have that old System/38 RPG III "END" opcode, then yes, it should potentially be there. If there's still using it, I see no reason to put any extra effort into supporting it, however. |
I'd agree it's not worth a lot of extra effort. I was pointing it out incase it was simply a matter of having I still run into it once and a while. Some may have originated in RPG III, but just as likely to have come from a (lazy?) RPG IV developer. It is valid fixed format, may consider how not supporting it would break the new functionality. |
Help me understand this—I’ll admit I’m by no means an expert on fixed-length RPGs… |
Yes, https://www.ibm.com/docs/en/i/7.6.0?topic=codes-endyy-end-structured-group
|
Okay, I was immediately proven wrong... Adding “END” isn't as straightforward as I'd hoped; it's causing quite a few issues when trying to identify the block that the generic keyword belongs to. In fact, there could be several possibilities, especially when blocks are nested... I quickly tried changing the data structure for storing the block structure, but even in this case there are errors... which I hadn't noticed before, since it was unique I'll try to look into it again in the next few days, but I can't guarantee that it will be feasible in the short term... @bobcozzi @charles-slc I'd like to know if this issue with the generic END is a recurring problem (in which case it would be worth the effort to completely overhaul the logic) or if it's a fairly isolated case |
Not sure I understand the question. Do you mean:
For 1, I can't think of anything similar. For 2, as Bob pointed out it's a relic from RPG III. But it is still valid RPG IV. A quick search of our codebase turned up about 3% of our programs using it at least once. (high score was 193 occurrences) |
|
The "END" opcode in fixed format: "END" was deprecated about 10 years prior to RPG IV being released. It was included in RPG IV to enable simpler CVTRPGSRC conversion; so that conversion tool could simply convert (i.e., reformat) RPGIII into RPG IV without maintaining context during conversion. It is not now, nor has it ever been advocated as a thing--kind of like using an Input field "status" indicator where if blank then set on indicator 71. Sure it is supported in the compiler, but should it be used? So in summary, "END" is used in place of any of the following: So when "END" is detected, it matches the most recently detected conditional statement above it. |
|
ok, I think I’ve managed it—at least it worked in all the test cases I generated. |
|
I'll give it a shot this week. I don't know if it helps or hurts, but note that Think of it as a stack, pushing the condition op-codes (and line nbr), popping when you hit |



Changes
This release improves block logic. Specifically, support has been added for highlighting different functional blocks, including the start and end of each block. Support has also been added for folding blocks and for displaying information within the navigation bar.
The support works for:
Checklist
console.logs I addedcloses #486