Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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