New topic: Incrementing string numerical value
<http://forums.realsoftware.com/viewtopic.php?t=34331> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message writer Post subject: Incrementing string numerical valuePosted: Sat Jun 19, 2010 1:20 pm Joined: Wed Jan 31, 2007 9:01 am Posts: 234 Location: Saratoga Springs, NY area Hi, I'm trying to create a quiz in which the quiz-taker selects 1 of 5 radio button choices (using 1 radio button with 5 index values: 0,1,2,3,4). Each selection is scored with a different value (0,1,2,3,4) and the score appears in a textfield. The challenge is to record each of 70 questions' scores in a text file, using TextOutputStream and numbering each line's score (1-70, starting with 1). I can use TextOutputStream to create or append, each time reading from the textfield into a text file (quiz-taker uses a button to advance to the next question). The problem is how to increment a string with a number +. The questions are numbered 1-70. Code like n, n+1, won't work in the TextOutputStream which needs a string. First line=1, second line (if there is a first line) =2, etc. Any suggestions appreciated. _________________ writer Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2010-2 Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
