School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,125 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,081 people online right now. Registration is fast and FREE... Join Now!




outofbounds error

 

outofbounds error, psuedocode

juansanmartin189

29 Oct, 2009 - 03:59 PM
Post #1

New D.I.C Head
*

Joined: 25 Nov, 2006
Posts: 6


My Contributions
i get outof bounds when i run the program. i call the inputs , then i want to display all my inputed data in a nice format but I cant figure out why my data doesnt output


CODE
// =============================================================================
//  Module Name: Lab 7 Customer Information
// Student Name: Juan San Martin
// Date Created: 10/22/2009 9:15:32 PM
//  Description:
// =============================================================================

Module Main()
// Define Variables
   Declare String salutation = ""
   Declare String firstName = ""
   Declare String lastName = ""
   Declare String streetAdd = ""
   Declare String state = ""
   Declare Integer zipCode = 0
   Declare String companyName = ""
   Declare Integer telephoneNum = 0
   Declare Real creditLimit = 0

   Display "Customer Information"
   Display ""


// This calls the module that retrieves salutation

Call GetSalutation(salutation)
Call GetFirstName(firstName)
Call GetLastName(lastName)
Call GetStreetAdd(streetAdd)
Call GetState(state)
Call GetZipCode(zipCode)
Call GetCompanyName(companyName)
Call GetTelephoneNum(telephoneNum)
Call GetCreditLimit(creditLimit)
Call GetDisplayAll(String Ref salutation,String Ref firstName,String Ref lastName,String Ref streetAdd,String Ref state,Integer Ref zipCode,String Ref companyName,
Integer Ref telephoneNum,Real Ref creditLimit)

End Module

// Module that retrieves customer salutation

   Module GetSalutation(String Ref salutation)

   Display ""
  
   Input "Enter Salutation Ex:Mr. Mrs. Ms, Messrs., Dr., Ph.D.:" salutation

   End Module

// Module that retrieves first name

   Module GetFirstName(String Ref firstName)
  
   Input "Enter First Name:" firstName
  
   End Module

// Module that retrieves last name

   Module GetLastName(String Ref lastName)

   Input "Enter Last Name:" lastName

   End Module

// Module that retrieves street address

   Module GetStreetAdd(String Ref streetAdd)

   Input "Enter Street Address:" streetAdd

   End Module

// Module that retrieves state

   Module GetState(String Ref state)

   Input "Enter the State:" state
  
   End Module

End Module

//Module That retrieves zip code

   Module GetZipCode(String Ref zipCode)

   Input "Enter Zip Code:" zipCode

   End Module

// Module That retrievs company name

   Module GetCompanyName(String Ref companyName)

   Input "Enter Company Name:" companyName

   End Module

//Module that retrieves Telephone Number

   Module GetTelephoneNum(Integer Ref telephoneNum)

   Input "Enter Telephone Number: " telephoneNum

   End Module

// Module that retrives Credit Limit

   Module GetCreditLimit(Real Ref creditLimit)

   Input "Enter Credit Limit:" creditLimit

   End Module

// Module Display All Information

   Module GetDisplayAll(String salutation,String firstName,String lastName, String streetAdd, String state, Integer zipCode, String companyName, Integer telephoneNum, Real creditLimit)

Display "COMPANY NAME: "
Display "CONTACT: " salutation "." firstName
Display "            "      
Display "             "            
Display "TELEPHONE NUMBER:"
Display "CREDIT LIMIT:" Format(, "$###,###.00")
End Module
End Module


*** MOD EDIT: Added code tags. Please code.gif ***

This post has been edited by JackOfAllTrades: 29 Oct, 2009 - 04:10 PM

User is offlineProfile CardPM
+Quote Post


cvitullo

RE: Outofbounds Error

29 Oct, 2009 - 04:05 PM
Post #2

New D.I.C Head
*

Joined: 2 Apr, 2009
Posts: 13


My Contributions
I'm pretty sure you're not in the right forum, that doesn't look like C/C++. Also, you should put your code in code brackets.
User is offlineProfile CardPM
+Quote Post

JackOfAllTrades

RE: Outofbounds Error

29 Oct, 2009 - 04:10 PM
Post #3

I exist to Google your problems.
Group Icon

Joined: 23 Aug, 2008
Posts: 5,322



Thanked: 454 times
Dream Kudos: 50
Expert In: Being annoyed with lazy people.

My Contributions
Moving to Other Languages.
User is online!Profile CardPM
+Quote Post

juansanmartin189

RE: Outofbounds Error

29 Oct, 2009 - 04:15 PM
Post #4

New D.I.C Head
*

Joined: 25 Nov, 2006
Posts: 6


My Contributions
QUOTE(JackOfAllTrades @ 29 Oct, 2009 - 04:10 PM) *

Moving to Other Languages.


wow great help sleep.gif this is basic psuedocode it isnt propietary language just something my college provides


any ideas would help
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 02:23PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month