
-----------------------------------
v3n0m
Tue Nov 15, 2005 10:06 am

help with letter changer
-----------------------------------
hey im new to turing i started it last week and am learning it on my own but my compsci teacher gave me a booklet of questions to try to do by making certain programs and i cant figure out how to do this one quesiton you have to input a letter thats a capital and output it as a small cased letter any ideas?

-----------------------------------
ZeroPaladn
Tue Nov 15, 2005 10:09 am


-----------------------------------
look up Str.Lower and Str.Upper, or just type these and hit F9, it will give you examples and hints on how to use it. In fact, if there is something you dont understand, just type it out and hit F9, it should shed some light on the situation.

-----------------------------------
v3n0m
Tue Nov 15, 2005 10:17 am

help with letter changer
-----------------------------------
this turing program im using is rather old and doesnt have str.upper and str.lower any other ideas?

-----------------------------------
v3n0m
Tue Nov 15, 2005 10:35 am

help with letter changer
-----------------------------------
nevermind i figured it out it went like this

var bah: string
var X : int
var value :int
put "enter a single character "
get bah
X:=ord(bah)
put "ASCII value of ", bah, " is ", X
X:=X+32
put "the lower case letter is ", chr(X)

-----------------------------------
Tony
Tue Nov 15, 2005 12:49 pm


-----------------------------------
what if the user enters a lower case letter or a number?

-----------------------------------
MysticVegeta
Tue Nov 15, 2005 7:55 pm


-----------------------------------
heheheheh strintok to the rescue then!

-----------------------------------
Tony
Tue Nov 15, 2005 10:53 pm


-----------------------------------
he's not using strint() though.

the proper answer was to check if the letter is in the proper value range first :wink:

-----------------------------------
MysticVegeta
Wed Nov 16, 2005 7:53 pm


-----------------------------------
hmm what i meant was
if ~strintok(bah) then
%continue
else
put bah
end if


-----------------------------------
jacklarry
Wed Nov 16, 2005 8:04 pm


-----------------------------------
you could use stinkok. thats probably the easiest and best way to do it.

-----------------------------------
Mr. T
Wed Nov 16, 2005 11:06 pm

Alex's Opinion
-----------------------------------
you could use stinkok. 
LMAO.  :doh:

-----------------------------------
ZeroPaladn
Thu Nov 17, 2005 9:48 am


-----------------------------------
provided venom knows how to use strintok :roll: .
