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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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
  • 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.