Change the value of a double (help)? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Change the value of a double (help)?

GUI_MattGUI_Matt Posts: 1Member
I wanted to know how to change the value of a double in code, not by manually typing in the value. Example: If i set the value of double hi to 50, I'd type in a line of code to change it to 60 permantly. So if i run it, close it and run it again, the value will stay 60. Please help.

Comments

  • MrShadovMrShadov Posts: 3Member
    -removed repost-
  • MrShadovMrShadov Posts: 3Member
    The best way I can think of doing that would be having an external file to hold the value of variable(s) you want. Read from the file and assign to whichever variable(s) you want. Then simply rewrite the file with the new value(s). This way, the new value is always assigned to your variables each time you run your program. And always remember to close out the file at the end of program execution!
  • MrShadovMrShadov Posts: 3Member
    The best way I can think of doing that would be having an external file to hold the value of variable(s) you want. Read from the file and assign to whichever variable(s) you want. Then simply rewrite the file with the new value(s). This way, the new value is always assigned to your variables each time you run your program. And always remember to close out the file at the end of the program!
Sign In or Register to comment.