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


  • Subject: Re: BIF's question.
  • From: bmorris@xxxxxxxxxx
  • Date: Fri, 26 May 2000 09:44:26 -0400




>Date: Thu, 25 May 2000 08:27:29 -0400
>From: jpcarr@TREDEGAR.COM
>
>>What happens if you then change the length of the field back to 6?
>
>Suprisingly  I think you will see the '12345'  again.   I don't think
>it should work this way.
> ...

It doesn't work that way ...

The reasoning is that the value of bytes after the current length
is undefined.  (For example, the compiler doesn't initialize the
whole field, or copy the whole field from the buffer on input.)

Anyway, if the length of a varying field is increased, the additional
characters are set to blanks.

This behaviour can be awkward if you actually want the data to stay
the same and the length to go up and down, but we thought it would
be more usual that programmers would have garbage in those bytes
and would not always be lucky enough to find out about the random
garbage in their fields during testing rather than after putting
their code into production).

Barbara Morris, IBM Toronto Lab, RPG Compiler Development


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.