string problem
Author |
Message |
pavol
|
Posted: Sat May 27, 2006 7:29 pm Post subject: string problem |
|
|
is turing the only programming language that limits its string size to 256 char, or am i just seeing things? is there any possible way to get around this? im making a program and it needs to read a file, except if one line in the file contains more than 256 char, then it crashes? any help or comments appreciated. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
MysticVegeta
|
Posted: Sat May 27, 2006 7:52 pm Post subject: (No subject) |
|
|
its actually 255..
well I know that java supports more than 255 chars... even more than 500? I am not sure... for the reading from a file thing, why dont you try it? make a string 300 chars long and try to read in using the ":*" It should output an error. so maybe "get : fileNo, string(255)" would work |
|
|
|
|
|
[Gandalf]
|
Posted: Sat May 27, 2006 8:52 pm Post subject: (No subject) |
|
|
Yeah, but then you would be missing out on the rest of the characters...
Why don't you use a flexible array of strings (each word), or characters (each letter) which resizes itself based on the size of the line. If you don't know how to use them, you can find the tutorial on flexible arrays in the Turing Walkthrough. Any help on implementing it, just repost and show what you have. |
|
|
|
|
|
|
|