?
Solved

Vertical Scroll

Posted on 2004-08-03
5
Medium Priority
?
255 Views
Last Modified: 2010-05-18
Does anybody have code for this?,

I'm doing a 16-bit (DOS) C program for reading a file with 2 fields pipe separated, and show them like

Key     Des
    1     One
    2     Two
    3     Three
and so on

I want to know how i can "scroll" the list if i've got more lines that maximum i can display at once.
Thanks
0
Comment
Question by:VisionC
  • 3
5 Comments
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 400 total points
ID: 11710334
If you want to make a plain terminal-style app, just put a message every 24 lines:

printf("Key\tDescription\n");
for (int i=0; i<maxElement; i++)   /* assuming some variable names */
{
         if ( (i+1)%24==0 ) {
              printf("Press any key to continue...");
              getch();
              printf("\n");
         }
         printf("%i\t%s\n", i, yourArray[i] );
}

If you want a more sophisticated user interface, use console functions that Turbo C gives you.

good luck,
Jaime.            
0
 

Author Comment

by:VisionC
ID: 11710373
How can i know about those console functions?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11710464
Sorry, there are many years since I stop developing in Turbo C (about 15), but all information is in Turbo C Help.
See help about <conio.h> funtions.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 400 total points
ID: 11710489
If you want to download Turbo C for free, go to:
http://community.borland.com/article/0%2C1410%2C20841%2C00.html
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 11711209
You could always just pipe the output to the MORE command on DOS.

C:> yourcmd | more

http://support.microsoft.com/?kbid=227449

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question