Hey again, went through some of the Turing Walkthrough, and like to say it is really well done. For the string manipulation however, with "Paul Frederic Simon" how would you eliminate the spaces, yet keep the full name with the end product looking like "PaulFredericSimon"
I tried to do that below but with commas, the problem is when it finds the last comma it goes back (i-1) and leaves the rest of the sentence out. so below it would end up "Look, No" how do i get it so it outputs "Look, No, Commas!!" without any commas??? thanx again.
code: | var sentence := "Look, No, Commas!!"
var new_name : string
var storage : string
for i : 1 .. length (sentence)
if sentence (i) = chr (44) then
new_name := sentence (1 .. i-1)
end if
end for
put new_name |
|