954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Urgent Help PLZ

i make a menu AS SHOWN:

PASCAL when press Ctrl + F9.
so its pascal

*************************
* 1. MEMBERS
* 2. BOOKS
* 3. EXIT
*
*
* SELECT OPTION:
************************

NEED HELP HERE:
write a PROCEDURE to close the menu when 3 is selected
sorry 4 this, its too long, but u can understand my prob clearly

any help plz

manutd4life
Junior Poster
123 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
 

well i distinctly remember seeing something as 'show real effort with ur assignments'.....Anyways wut you should do is to make a procedure for da menu and in it use a parameter that'll pass the entered number to da main program,and in da main program use REPEAT with dat passed parameter like

repeat
{case or nested ifs for procedure calling goes here}
until variable=3;
another guest
Junior Poster in Training
66 posts since Jan 2008
Reputation Points: -7
Solved Threads: 4
 

i cant understand clearly watu r saying
can u wite the codes plz i just start in pascal

manutd4life
Junior Poster
123 posts since Dec 2007
Reputation Points: 10
Solved Threads: 1
 

menu procedure should be like

procedure menu(var option:integer);
{so this'll be where you put all txt to display,i'm saving myself a few lines here lol}
readln(choice);
end;
{top level begins here,i'm only writing the lines you need for this repeating menu}
var option:integer;
{you'll have more variables but as i said i'm only dealing wiv da menu}
repeat
menu(option);case option of
1:member procedure;
2:books procedure;
until option=3;

hope this helps :)

another guest
Junior Poster in Training
66 posts since Jan 2008
Reputation Points: -7
Solved Threads: 4
 

Try this site for some really good & simple examples of how to handle menus and their associated actions: http://blogs.codegear.com/nickhodges/index.php?p=26687

jsosnowski
Junior Poster in Training
68 posts since Nov 2007
Reputation Points: 11
Solved Threads: 11
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You