Jan-21-2021, 07:34 PM
In answer to reload, yes you can do that. Don't you have access to the internet?
But it is still a REALLY HORRIBLE IDEA. You should not be writing code to represent data. You should have a file somewhere that contains the number 10. You should have some code that will read the file and return the number. You should have some different code that writes a different number to this file. If you take money out of your wallet you read the number from the file, subtract the withdrawal and write the new value to the wallet. The code to do the transaction does not import the data file, it uses the file as a kind of persistent variable.
But it is still a REALLY HORRIBLE IDEA. You should not be writing code to represent data. You should have a file somewhere that contains the number 10. You should have some code that will read the file and return the number. You should have some different code that writes a different number to this file. If you take money out of your wallet you read the number from the file, subtract the withdrawal and write the new value to the wallet. The code to do the transaction does not import the data file, it uses the file as a kind of persistent variable.