Author |
Message |
cheese188
|
Posted: Wed Apr 08, 2009 7:52 pm Post subject: can i make a basic unkown int? |
|
|
if i had the variable
Turing: | var n : int
n := %how can i make n unkown
|
just thought id put that in cause it looks cool
Mod Edit: Remember to use syntax tags! Thanks code: | [syntax="turing"]Code Here[/syntax] |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
saltpro15

|
Posted: Wed Apr 08, 2009 7:57 pm Post subject: RE:can i make a basic unkown int? |
|
|
what do you mean by unknown? like a random number? if so, use
Turing: |
var num := Rand.Int (1,100)
|
for example, that will create a random integer between 1 and 100 |
|
|
|
|
 |
cheese188
|
Posted: Wed Apr 08, 2009 8:07 pm Post subject: Re: can i make a basic unkown int? |
|
|
not really i need like an integer that can be anything a user enters so i can use it in an if statement
with another integer like
code:
kind of like a question, if n = 1 then it say's kauf then whoever enters g
then if the g they entered is the same as n then it say's jadg
what i need to know is how to make g 3 different values or any value
hope i explained it well enough[syntax=""][/syntax] |
|
|
|
|
 |
saltpro15

|
Posted: Wed Apr 08, 2009 8:30 pm Post subject: RE:can i make a basic unkown int? |
|
|
what's with all the extra brackets? I don't think they're necessary...
just use a get statement
code: |
var n : int
get n
if n = 1 then
%do something
elsif n = 2 then
% do something else
|
|
|
|
|
|
 |
cheese188
|
Posted: Wed Apr 08, 2009 8:36 pm Post subject: Re: can i make a basic unkown int? |
|
|
oh its so simple i did not think of putting a get statement before if statement
thanks a lot that's going to complete my program |
|
|
|
|
 |
saltpro15

|
Posted: Wed Apr 08, 2009 8:38 pm Post subject: RE:can i make a basic unkown int? |
|
|
no problem |
|
|
|
|
 |
Siavash
|
Posted: Sat Apr 11, 2009 7:35 am Post subject: RE:can i make a basic unkown int? |
|
|
I do
|
|
|
|
|
 |
|