Computer Science Canada String Data Limit vs. Flexible Array |
Author: | Dragon20942 [ Sun Dec 18, 2011 5:47 pm ] | ||
Post subject: | String Data Limit vs. Flexible Array | ||
What is it you are trying to achieve? I am attempting to file each character (does not matter if spaces are included or not, but I would like to know) of a text file into a separate index of a flexible string array to avoid the max string character limit of 255. What is the problem you are having? I cannot isolate each letter of the text file without first creating a variable to take on the value of the entire text file, which could potentially exceed 255 in length. Describe what you have tried to solve this problem I tried to use "length" on the text file information (without creating a variable), but could not find the correct syntax, if one exists for that operation. Post any relevant code
Please specify what version of Turing you are using 4.1.1 |
Author: | Tony [ Sun Dec 18, 2011 6:03 pm ] |
Post subject: | RE:String Data Limit vs. Flexible Array |
read the docs got get, it has relevant examples. |
Author: | Dragon20942 [ Sun Dec 18, 2011 6:26 pm ] |
Post subject: | Re: String Data Limit vs. Flexible Array |
Was the intention to lead me to "char"? All I had to do was change my array into chars and it was all solved ![]() |
Author: | Tony [ Sun Dec 18, 2011 6:38 pm ] |
Post subject: | RE:String Data Limit vs. Flexible Array |
that's one way, yes. You could also get content of fixed length, so you could read from a file in blocks of size at most 255. Though either approach works, and there are unique tradeoffs to each. |