× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx 
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Jon Paris
Sent: Friday, August 04, 2006 1:10 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: SETLL not working 

 >> 1) Why did the compiler even accept this?  Assuming 
(mykds) was treated
as a single field, shouldn't the compiler have complained 
that mykds was not
the same size as the first key field in the file.

I'm not Barbara but I can answer this one.  The reason is 
that since you are
in /free a list of key fields in parentheses is a perfectly 
legal way to
supply a partial (or indeed full) key.  In fact most people I 
know use this
in preference to %KDS as you can see exactly what key fields 
are in use.

I often do it that way, but in this instance I needed to save the key
between different procedures and a module level %kds seemed like a good
way to do this.


The reason the compiler doesn't complain is that as long as 
the base data
type matches (char/num/date) it will effectively do an eval 
for you into a
temp field that does match the key (first) key field's 
definition, and use
that as the key.  It is one of the features of the new free-form key
support.

I assumed this was the case, as it was the only thing that made sense.
I didn't realize the compiler would do the eval into the temporary.  But
it makes sense as you can use a list of literal values in the same place



If you'd done it in fixed form the compiler would have gotten upset. 

As to your second question I can't see why it would change 
it.  Are you sure
that is all that was changed?


Yep, I'm positive.  That's what's got me scatching my head.

Charles Wilt


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.