
-----------------------------------
upthescale
Tue Mar 21, 2006 9:45 pm

Variable Lesson
-----------------------------------
Here yeah go:


% This lesson will teach you about variables.
%A variable is to be declared, so you can use it through out the program.
%here is an example:

var age:int    %This is age is the variable...since you are asking for an
%Age, you are wanting the user to type in a number, so that is why the
%:int is after. The :int is used for when the user types in numbers.

put"How old are you?" %pretty simple, just asking the user 'how old are you?'"

get age %Now, this get command will allow the user to type in anything. The
%User can type in words and numbers, but since age is declared as a :int,
%the program will only allow a number if the user hits enter. If the user types
%in a letter then the program will terminate. So smiply, this get command
%allows the user to type. The variable is age, so you want to put get age. if you
%put get ages then it won't work because you created a variable for age

cls%Clears the screen afterwards


%that is a basic variable...if you want the user to t ype in words, then
%instead of :int you would put :string. String allows the user to type in
%words...

%any more questions my email is circa_appleyard707hotmail.com


-----------------------------------
chrispminis
Tue Mar 21, 2006 10:16 pm


-----------------------------------
This should be in Turing Tutorials section. Not to mention we already have perfectly good variable tutorials in that section.

-----------------------------------
Imm0rtal
Tue Mar 21, 2006 11:53 pm


-----------------------------------
This should be in Turing Tutorials section. Not to mention we already have perfectly good variable tutorials in that section.

Wtf is a variable?

-----------------------------------
person
Wed Mar 22, 2006 11:52 am


-----------------------------------
Your kidding right?
In that case, read his tutorial...for example it could be
var variableName : int

-----------------------------------
do_pete
Wed Mar 22, 2006 2:40 pm


-----------------------------------
Wtf is a variable?
Check out the Turing Walkthrough

-----------------------------------
Imm0rtal
Wed Mar 22, 2006 5:33 pm


-----------------------------------
O u meen those words that = other words? I never use those.. they take up too much space.

-----------------------------------
[Gandalf]
Wed Mar 22, 2006 6:29 pm


-----------------------------------
Please, no more posts here...  It's obvious at least one person is being sarcastic here, and this is becoming spam.  I'm pretty sure that everyone who posts here knows what variables are.  If not from computer science, then at least math.

-----------------------------------
Cervantes
Wed Mar 22, 2006 7:06 pm


-----------------------------------
Hi upthescale: Glad to see you're submitting. However, Turing tutorials belong in the If I do say so myself. ;)

This should be in Turing Tutorials section. Not to mention we already have perfectly good variable tutorials in that section.
Indeed, but let's go with [Off Topic] since this isn't quite a tutorial, and the thread has indeed gone off topic.
