Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Visual Logic Assistance - Retaining Value of a variable


  • Please log in to reply

#1
allgoodhollywood

allgoodhollywood

    New Member

  • Member
  • Pip
  • 1 posts
I am working on a pseudocode with call procedures that allows a customer to select their gasoline service and then their gasoline grade. The pseudocode should calculate their charges and display them for the customer. I have a main module and 3 sub modules (Input, calculate and output). The user defines their service type and gasgrade in the input module. Apparently, the gasgrade value doesn't retain in the calculate or output modules. I would redefine the variable in these two submodules, but the user defines the value of gasgrade, so I can't define it because I don't know what the customer will choose.

Can anyone tell me how to make the variable definition stick throughout all the modules?

Edited by allgoodhollywood, 13 March 2011 - 09:05 PM.

  • 0

Advertisements


#2
saw8414

saw8414

    New Member

  • Member
  • Pip
  • 1 posts
Try passing the variables you want the program to remember outside the procedure as a reference instead of a value.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP