|
Thanks Jon. Just seems odd that the compiler will happily accept below
and not allow doing the same thing on %lookup.
D getArray pr 3 dim(8)
D myLookUp pr 5i 0
D piArg 3 value
D piArray 3 dim(8) const
C if myLookup(' ' :getArray) > 0
C endif
C eval *inlr = *On
********************************************************
P myLookUp B
D pi 5i 0
D piArg 3 value
D piArray 3 dim(8) const
C return 1
P myLookUp E
********************************************************
P getArray B
D pi 3 dim(8)
D prArray s 3 dim(8)
C return prArray
P getArray E
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Friday, January 13, 2006 12:43 PM
To: rpg400-l@xxxxxxxxxxxx
Cc: Barbara Morris
Subject: RE: compile error on %lookup where array is the return value of
aprocedure
Although there is no obvious reason I can think of why the compiler
would not allow this, I am not that surprised that it fails. I know
that %Lookup does not permit %SubArr as an operand - admittedly it
doesn't make much sense since %lookup can already control the scope of
the search but ...
The manual explicitly states that an "array" is required as the
parameter for %Lookup. Normally when something other than a basic data
type is permitted the manual would say something like "array
expression". However, the manual appears to be very inconsistent - at
least in the BIFs. Just a cursory reading reveals that %Elem says
"array name" not simply "array".
Similarly %EditW and %EditC both say "numeric", whereas %EditFlt says
"numeric expression". To the best of my knowledge all three take an
expression - for sure %EditC does.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.