Closeall
Open("TEST","r+")->F
Read(°B,3,1,F
If B<SCORE
Write(°SCORE,3,1,F
End
Closeall
Open("TEST","r")->F
Read(°B,3,1,F
If B<SCORE
Open"TEST","w")->F
Write(°SCORE,3,1,F
End
Coding_guy___ wrote:
Closeall
Open("TEST","r+")->F
Read(°B,3,1,F
If B<SCORE
Write(°SCORE,3,1,F
End
This should help
Code: Closeall // CLOSES ANY OPEN SLOTS
Open("TEST","R")->SLOT // OPENS APPVAR FOR READING
Read(°B, 3, 1, SLOT) // READS THE B FROM APPVAR SLOT
CLOSESLOT(SLOT) // CLOSES THE READING APPVAR SLOT
If B<SCORE THEN // CHECKS IF B IS BIGGER THAN SCORE
SCORE->B // STORE SCORE IN B. (B IS THE APPVAR VARIBLE AND IT NEEDS TO BE RECALLED LATER ON)
Open("TEST", "W")->SLOT // OPENS THE APPVAR FOR WRITING
Write(°B, 3, 1, F) // WRITE B IN APPVAR
CLOSESLOT(SLOT) // CLOSES THE APPVAR FOR WRITING
END // END OF IF BLOCK
I would suggest that you learn C, because Ice only has a fraction of the possibilities that C has, and C is more powerful, is compressed, has hundreds of more pre-defined functions in the standard C libraries, and it is easier to read C code.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum