× 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.



Kurt,

FWIW, when I've hit anything like this scenario, I save a copy of the DS in
the caller prior to the call and then copy back in the subfields I want to
remain unchanged. I assume that's probably what you're doing here.

Rory

On Mon, Jun 18, 2012 at 12:52 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hi Kurt,

Yeah, we've gone off on a tangent from your original question.

As others have already explained, with regard to your original question,
you either have to mark the parameter (i.e. the entire data structure)
as const or not const.

Passing the changable field in a separate parameter is about your only
option.

FWIW -- I don't know of any programming language (Java, PHP, C, C++,
etc) where you can pass a whole data structure (or object) so that the
called routine can change some parts but not others.

Sorry for any confusion, though... we went off on a tangent discussing
the "const and I really meant it" idea.

Good luck to you.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.