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

Username:   Password: 
 RegisterRegister   
 [Tutorial] Very Simpel I/O
Index -> Programming, Turing -> Turing Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dan




PostPosted: Sun Sep 15, 2002 7:56 pm   Post subject: [Tutorial] Very Simpel I/O

Ok this tutorial is mainly for people new to Turing and is about how to put text on the screen and get input form the user.


How to put text on the screen with out var's:

code:

put "your text here" %displays text in " "

put "hello all "..        % .. makes the next put go to the same line
put "this is Turing"



How to display text using a var:

code:

var mytext :string %decaler your string here

mytext := "I am programming in Turing!!!" %set the value of mytext

put mytext %displays the value of mytext



How get input from a user:

code:

var name :string %value to store input from user

put "What is your name?"; %ask the user for there name
get name %input the users text to the var name

put "Hello ".. %say hello to user
put name



Ok that is very simple I/O in Turing, if I have time I will try to add more. If you have any questions about this plz post and let us know. Wink
Sponsor
Sponsor
Sponsor
sponsor
Jonny Tight Lips




PostPosted: Sat Jul 26, 2003 5:44 pm   Post subject: question

after the % is it a comment? Or is it something immportant?
rizzix




PostPosted: Sat Jul 26, 2003 5:46 pm   Post subject: (No subject)

it's a comment -- ignored by the compiler/interpreter.
PaddyLong




PostPosted: Sat Jul 26, 2003 8:40 pm   Post subject: (No subject)

wow a post by Dan and no typos ... Shocked
SilverSprite




PostPosted: Sat Jul 26, 2003 8:47 pm   Post subject: Re: [Tutorial] Very Simpel I/O

Hacker Dan wrote:
Ok this tutorial is mainly for people new to Turing and is about how to put text on the screen and get input form the user.

bolded a typo:P Not to mention the title of the thread.
PaddyLong




PostPosted: Sun Jul 27, 2003 1:23 pm   Post subject: (No subject)

heh
netninja




PostPosted: Wed May 19, 2004 6:24 pm   Post subject: (No subject)

dont patronize him so much Laughing

Good post though, maybe theres someone out thats heard of turing but doesnt know about put. heh
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: