Computer Science Canada how to get turing to interpret a string as a integer without using strint |
Author: | simonsben [ Sat May 04, 2013 4:24 pm ] |
Post subject: | how to get turing to interpret a string as a integer without using strint |
I am using Open Turing Editor version 1.2 (beta) I am importing data from a .txt file then comparing a integer from the .txt file with a integer type variable. To allow this to happen im through strint it does not let me. I have tries using the cheat command however it interprets the number incorrectly so it is no help. please help! |
Author: | Insectoid [ Sat May 04, 2013 5:01 pm ] |
Post subject: | RE:how to get turing to interpret a string as a integer without using strint |
Cheat doesn't convert strings to numbers. It looks at the raw data stored in the RAM and interprets that as a given type. "52" is not the same as 52. Quote: To allow this to happen im through strint it does not let me.
It does. You're probably doing something wrong. Strint is exactly what you should be using. I can't really help unless you post the error though. |
Author: | theothercole [ Sun May 05, 2013 11:49 pm ] |
Post subject: | Re: how to get turing to interpret a string as a integer without using strint |
simonsben wrote: I am using Open Turing Editor version 1.2 (beta) I am importing data from a .txt file then comparing a integer from the .txt file with a integer type variable. To allow this to happen im through strint it does not let me. I have tries using the cheat command however it interprets the number incorrectly so it is no help. please help! Can you post the part of the code you are referring to? |