Computer Science Canada

[Tutorial] Very Simpel I/O

Author:  Dan [ 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

Author:  Jonny Tight Lips [ Sat Jul 26, 2003 5:44 pm ]
Post subject:  question

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

Author:  rizzix [ Sat Jul 26, 2003 5:46 pm ]
Post subject: 

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

Author:  PaddyLong [ Sat Jul 26, 2003 8:40 pm ]
Post subject: 

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

Author:  SilverSprite [ 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.

Author:  PaddyLong [ Sun Jul 27, 2003 1:23 pm ]
Post subject: 

heh

Author:  netninja [ Wed May 19, 2004 6:24 pm ]
Post subject: 

dont patronize him so much Laughing

Good post though, maybe theres someone out thats heard of turing but doesnt know about put. heh


: