Solved

Vertical Scroll

Posted on 2004-08-03
5
222 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 200 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 200 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

786 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