Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 string problem
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
pavol




PostPosted: 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. Smile
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: 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]




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: