[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Vertical Scroll

Posted on 2004-08-03
5
Medium Priority
?
252 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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 and use switch statements in the C programming language.
Suggested Courses

649 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