As a follow-up:
I understand that CALL will send a char(32), so if my prototype expects a char(32) (or shorter) and I send a parm that is 7 characters long, then the trim works as expected because my program's receiving a char(32), comprised of my 7 char string and 25 blanks at the end.
If ...
Search found 3 matches
- Mon Jun 30, 2025 1:23 pm
- Forum: RPG IV
- Topic: Trimming prototype/interface variables only works with certain lengths
- Replies: 4
- Views: 1246
- Fri Jun 27, 2025 11:50 pm
- Forum: RPG IV
- Topic: Trimming prototype/interface variables only works with certain lengths
- Replies: 4
- Views: 1246
Re: Trimming prototype/interface variables only works with certain lengths
Ah, thank you both--that makes sense. I appreciate the education!
- Fri Jun 27, 2025 8:49 pm
- Forum: RPG IV
- Topic: Trimming prototype/interface variables only works with certain lengths
- Replies: 4
- Views: 1246
Trimming prototype/interface variables only works with certain lengths
I have a program with a Main prototype (and matching pi) containing two char parameters. In my program, I'm ascertaining the "actual" lengths of the input parameters using %len and %trim, like so:
%len(%trim(var1));
I'm testing this by calling it from green screen and passing it params of length 7 ...
%len(%trim(var1));
I'm testing this by calling it from green screen and passing it params of length 7 ...