Display column numbers #1344
Unanswered
Gregory1701
asked this question in
IBM i
Replies: 2 comments 1 reply
-
That's odd. There should be a warning that is shown if you exceed the record length. I will look into this sometime this week. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Gregory1701 While waiting for @worksofliam to investigate, you can switch on the vertical ruler in VS Code. This will give you a vertical line at the column you specify. For how to do it, read here: https://dev.to/brad_beggs/vs-code-vertical-rulers-for-prettier-code-3gp3 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, I recently had a puzzle that I struggled with too long. I added in a small procedure to a module source. Such a simple change, what could go wrong? When I compiled it, I got several compiler errors both in my new procedure, but also in other procedures I didn't change. That's not right, so I cut my new procedure out and compile; it compiled fine. Paste my new procedure back and in and the errors return. After quite a bit of head scratching and troubleshooting, I discovered my problem.
This module is not **Free. @worksofliam - you tweeted a while back (jokingly) that you were going to add a wrapper to the compiler to throw an error if the source wasn't **Free. I chuckled, but the unfortunate reality is that we (all?) have a mixture **Free, free format and yes, fixed format RPG... blech...
Anyway, back to my issue. The cause of the errors was that in my new procedure I had some lines which exceeded the 80 column limitation. So, breaking those long lines into multi-line statements resolved the errors and compile completed successfully.
Now, my request. Had I been editing this source member in RDi, I would have seen right away that I was going to need to make these lines multi-line statements. I would have two cues to help me not stumble into this long research time; column numbers (along with the cursors current column) and any offending lines which are exceeding the current column max.
I cannot find a setting for this, so if I'm just missing it please point me in the right direction. Otherwise, can we have a setting(s) within the IBM i extension to enable the column bar at the top like RDi displays? Secondly, this could be a setting, but IMO, flagging lines that exceed the current max record length should be automatic and not a setting to be turned on or off. It's information that the editor already has and thus knows the compile is going to fail. Thus, again IMO, it should automatically convey that to the coder.
Beta Was this translation helpful? Give feedback.
All reactions