Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 24 SEP 2003 07:11:02AM Nick Stevenson wrote:

Using the following bit of code, the contents of page 2 are never displayed, instead the contents of page 3 are displayed on page 2.

Does anyone know why?

DECLARE SUBROUTINE INIT.VIEW

@VIEW.MODE=1

INIT.VIEW(70)

FOOTING "'L'Page'P'"

FOR XX=1 TO 10

HEADING.TXT=HEADING FOR NUMBER ':XX
HEADING HEADING.TXT
FOR LL=1 TO 10
  PRINT 'LINE : ':XX:'.':LL
NEXT LL

NEXT XX

STOP


At 24 SEP 2003 11:05AM Richard Hunt wrote:

Nick,

I copy and pasted. It worke fine for me. I saw all 10 pages correctly displayed.


At 24 SEP 2003 11:07AM Victor Engel wrote:

Works perfectly for me on version 2.12.


At 24 SEP 2003 11:29AM Don Miller - C3 Inc. wrote:

Ditto for me in:

AREV 3.12

AREV 2.12

AREV 2.0

So, something is FUBAR somewhere on Nick's system.

Don M.


At 25 SEP 2003 10:36AM Nick Stevenson wrote:

Thanks to those tried this, and found it to work! I know you understood my problem, but just to be sure: You will expect to see a number of pages of report, each page with a heading 'HEADING FOR NUMBER xx' and with 10 lines of print underneath it. On my system, I never see 'HEADING FOR NUMBER 2' not the lines that should be printed beneath it. Instead, I see 'HEADING FOR NUMBER 3' printed on Page 2.

Note that this ONLY happens to page 2!

Further testing has revealed (by putting a 'Hello World' message after the LL Print loop, that the correct page 2 is displayed, but is replaced immediately with the contents of page 3! It happens so quickly that you think it hasn't happened at all.

Also note that the problem only occurs when the HEADING statement is placed within the XX loop.

I'll try this on another installation of ARev.


At 25 SEP 2003 11:21AM Victor Engel wrote:

Just to be clear, I copyied your code into a main program (not a subroutine) and tested it at normal and 50 line screen modes. All ten pages with appropriate headers and footers were displayed.

What happens when you direct output to a printer? What are your values for @crthigh and @crtmaxhigh?


At 26 SEP 2003 05:04AM Nick Stevenson wrote:

Printed output is perfect. CRTHIGH=24, CRTMAXHIGH=25.

I have tried this test on another, completely independant, version of ARev and it also misbehaves. I know we can work around this problem, but it would be useful to determine what is going wrong as (a) There is the possibility that we use the same sort of code elsewhere in the system; and (b) We have to protect against this in future development.

I'm amazed that your system does not show the same error! Changing to 50 lines mode makes no difference - the contents of page 2 are not displayed, the contents of page 3 are shown on page 2. I've played with @PAGE by setting it to 1 before the loop, and lo and behold I get the output I expect, but when I page back I get a VSPACE error (I suppose because there is no page 1 actually written out). However, this seems to indicate an internal error with paging when the HEADING statement is within a loop.


At 26 SEP 2003 05:04AM Nick Stevenson wrote:

Printed output is perfect. CRTHIGH=24, CRTMAXHIGH=25.

I have tried this test on another, completely independant, version of ARev and it also misbehaves. I know we can work around this problem, but it would be useful to determine what is going wrong as (a) There is the possibility that we use the same sort of code elsewhere in the system; and (b) We have to protect against this in future development.

I'm amazed that your system does not show the same error! Changing to 50 lines mode makes no difference - the contents of page 2 are not displayed, the contents of page 3 are shown on page 2. I've played with @PAGE by setting it to 1 before the loop, and lo and behold I get the output I expect, but when I page back I get a VSPACE error (I suppose because there is no page 1 actually written out). However, this seems to indicate an internal error with paging when the HEADING statement is within a loop.


At 26 SEP 2003 05:06AM Nick Stevenson wrote:

Printed output is perfect. CRTHIGH=24, CRTMAXHIGH=25.

I have tried this test on another, completely independant, version of ARev and it also misbehaves. I know we can work around this problem, but it would be useful to determine what is going wrong as (a) There is the possibility that we use the same sort of code elsewhere in the system; and (b) We have to protect against this in future development.

I'm amazed that your system does not show the same error! Changing to 50 lines mode makes no difference - the contents of page 2 are not displayed, the contents of page 3 are shown on page 2. I've played with @PAGE by setting it to 1 before the loop, and lo and behold I get the output I expect (but the actual page no is 1 too high), but when I page back I get a VSPACE error (I suppose because there is no page 1 actually written out). However, this seems to indicate an internal error with paging when the HEADING statement is within a loop.


At 26 SEP 2003 10:11AM Victor Engel wrote:

Here's something that may provide additional information. Although the code produces the expected output, when I escape out of the view, the view box remains. If I comment out the footing line, however, the view box comes down as expected.


At 26 SEP 2003 10:14AM Victor Engel wrote:

The following code does NOT have the problem I cited with footing. The chief difference is that the footing line comes AFTER the heading line rather than before:

DECLARE SUBROUTINE INIT.VIEW

@VIEW.MODE=1

INIT.VIEW(70)

FOR XX=1 TO 10

 HEADING.TXT=HEADING FOR NUMBER ':XX
 HEADING HEADING.TXT
 FOOTING "'L'Page'P'"
 FOR LL=1 TO 10
    PRINT 'LINE : ':XX:'.':LL
 NEXT LL

NEXT XX

STOP


At 26 SEP 2003 10:28AM Richard Hunt wrote:

Nick,

I really can't remember that far back, although I do remember that the "FOOTING" command caused me problems. I believe if you would to add these two commands at the beginning it might help.

FOOTING ""

HEADING ""

Be sure to put the heading after the footing. All I remember is that I just simply stopped using the "FOOTING" command.


At 26 SEP 2003 10:41AM Victor Engel wrote:

"Be sure to put the heading after the footing."

I think this applies to clearing out the values only. I would suggest:

Encapsulate footing statements with heading statements:

HEADING Non-null

FOOTING whatever

FOOTING null

HEADING null

because it is the heading (not the footing) that controls paging. The footing command merely sets an attibute used by the pager.

However, I don't use either of these statements that much, so I may be unaware of some nuances.


At 26 SEP 2003 12:52PM Nick J Stevenson wrote:

What fun… I haven't had any problem exiting the view screen. My problem exists even if I remove the FOOTING command completely.

Oh well, what would ARev be without its little mysteries?

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/d7897ff7d5de7b7785256dab003d6f89.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1