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

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




PostPosted: Mon Apr 30, 2007 8:44 am   Post subject: Str

Sorry, I seem to be posting a lot but I'm in my grade 12 year yet im taking both computer sciences 11 and 12 in the same semester so its quite difficult for me. I'm just wondering what Str is and how I use it output the character length of a word, how to output a certain character in a word, etc...
Sponsor
Sponsor
Sponsor
sponsor
Carey




PostPosted: Wed May 02, 2007 9:17 am   Post subject: Re: Str

Str is a unit that contains routines for manipulating strings. Look in the Turing help file for details.

Turing:

var word : string := "dymd3z"

%Find the length
put Str.length (word)
%or
put length (word)
%outputs the length of word

%Output a certain character in a word (using substrings)
put word (4)
%puts the 4th char in word (d)


Hope that helps. In the future look at the Turing help file or the Turing Walkthrough for help first
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  [ 2 Posts ]
Jump to:   


Style:  
Search: