2 Replies - 885 Views - Last Post: 14 April 2012 - 04:20 PM Rate Topic: -----

#1 eespelman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 14-April 12

Trouble with psuedocode and calling modules

Posted 14 April 2012 - 02:10 PM

I have to write a pseudocode for an ATM, but I am having trouble with calling modules. I know that you simply type "CALL (procedure name)", I just want to be sure that I am going about this correctly. Is the following the correct way to call a module?


Procedure show_menu_c
Declare menu_option as interger
DISPLAY “Here is ATM Menu”
DISPLAY “1. Deposit”
DISPLAY “2. Withdraw”
DISPLAY “3. Balance Inquiry”
DISPLAY “4. Exit”
Prompt “For Deposit type 1, For Withdraw type 2, For Balance Inquiry type 3, For Exit type 4”
INPUT menu_option
IF 1 THEN
CALL Procedure deposit
IF 2 THEN
CALL Procedure withdraw
IF 3 THEN
CALL Procedure show_balance
IF 4 THEN
CALL Procedure return_card
ENDIF
END show_menu_c

Is This A Good Question/Topic? 0
  • +

Replies To: Trouble with psuedocode and calling modules

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5441
  • View blog
  • Posts: 11,673
  • Joined: 02-June 10

Re: Trouble with psuedocode and calling modules

Posted 14 April 2012 - 03:01 PM

Its not real code. I don't think there is a wrong way to not actually call something in not code.
If you understand the logic you have laid out so you can translate it to the real code in whatever language you are coding in then it should be fine.
Was This Post Helpful? 1
  • +
  • -

#3 turboscrew  Icon User is offline

  • D.I.C Addict

Reputation: 100
  • View blog
  • Posts: 615
  • Joined: 03-April 12

Re: Trouble with psuedocode and calling modules

Posted 14 April 2012 - 04:20 PM

The most important thing is to be consistent.
The next thing is to be descriptive enough gíven the level of abstraction.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1