[Site Home] [Forum Home] [Articles] [File DB] [News Archives]

Programming -> turing: project help


(View original topic)


Furball - Nov-22-2004 server time
Well, from the looks of it, you'll be getting a runtime error due to the fact that you are giving a comparison for a value that does not have an assigned value. The variable NWORD should have a value BEFORE it is compared. If it does not have a value, an error occurs. See if that fixes the problem. If not, write back and tell us what the error message says.

nicki - Nov-22-2004 server time
according to posts i have read not many users know turing...but it's worth a try... unsure.gif so here's my code and i need help to scramble letters in the word and everytime i try to run it ain't workin'

CODE
var word := "braveheart"
var nword : int

for scramword : 1 .. length (word)
   if nword = 0 then
       nword := word (1 .. scramword - 1) + word (scramword + 1 .. *) + word (scramword)
   else
       nword := word (2 .. *) + word
   end if
   put nword
end for

(Showing 50 last posts, newest on top)