|
On Sep 7, 2019, at 12:28 AM, Javier Sánchez <javiersanchezbarquero@xxxxxxxxx> wrote:
Today I was compiling a program in which a wanted to assign a substring
some value from a starting point, and this was a variable of type
PACKED(15:5) which in time I defined like that because it comes from the
command line. I had a compiler error claiming that the type of parameter 3
was in fact an expression like:
somevar = %SUBST(somevar: 5: parm_length - 4);
where parm_length comes as a parameter from the command line as a
PACKED(15:5). This was the cause of the error. I decided to declare
another INT(10) variable to which I assigned the value of parm_length minus
4 and replaced it in parameter 3 of the %SUBST. And it compiled. I didn't
have the time to investigate that but I could solve the inconvenience.
I would imagine that maybe something like that could be bothering you as
your variable for the starting point is exactly a PACKED(5) one. Maybe
PACKED variables are not welcome in %SUBST now.
It's only an opinion that would probably have more comments by the way.
Javier Sanchez.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.