Rocket U2 | UniVerse & UniData

 View Only

 How do you turn off automatic paging in a BASIC program.

Joe Goldthwaite's profile image
Joe Goldthwaite posted 03-08-2024 10:41

I'm embarrassed to even ask this. I've seen the answer a couple of times in the documentation but can't ever seem to find it if I'm looking for it. How do you disable the automatic paging where the program prompts the user to hit the return key to continue.

I know I can use the NO.PAGE option when running the program but I want to disable it in the program itself. Most of these programs were written for native Pick and were never designed to handing automatic paging. That's why I want to disable it in the program and not in the menu that run's the program.

Neil Morris's profile image
ROCKETEER Neil Morris

Hi Joe,

There may be other methods but I have always used the "hack" of specifying cursor positioning in program I learned many years ago.

For example:

DUMMY = @(0,0)
FOR X = 1 TO 1000
CRT X
NEXT X
END

Thanks,

Neil

Gregor Scott's profile image
PARTNER Gregor Scott

Output pagination can be set to ON or OFF by adjusting SYSTEM(1005) within your code:

* Turn output pagination OFF so we control it

assign 0 to system(1005)

.. .. ..

* Turn output pagination back ON

assign 1 to system(1005)

This allows your program to determine when to allow the system to perform it's normal pagination and when you want to totally disable it.

Joe Goldthwaite's profile image
Joe Goldthwaite

Hi Neil and Gregor,

Thanks for the information.  I remember using tricks like setting the something in the TERM command that disabled them. That was a long time ago and I couldn't find anything on it.

The DUMMY=@(0,0) works but like Neil said, it seems like a hack more than a design.  You can also use "N" in the heading to suppress pagination which also seems like a hacky way to do it.

ASSIGN 0 to system(1005) is what I was looking for.  With that I can turn it off or turn it back on directly.  That is NOT documented in the Universe manual. Neither the ASSIGN statement or SYSTEM(1005). I have the most recent manual 12.2.1.  How do you find it. Is it a standard on some other flavor of MVDB?

Thanks for the help! I appreciate it.

Gregor Scott's profile image
PARTNER Gregor Scott

@Joe Goldthwaite

I found that out by reading the source code in the APP.PROGS and BP libraries in the UV account.

It is helpful enough that it really should be documented in the manuals now.