string problems 
Author Message
 string problems

I'm trying to make a jumbled word game and am having problems with the
string manipulation. I have a field of type SFString which contains the word
and another field of the same type which holds the mixed up letters. The
problem is I can't set a particular letter in the mixed up word. I'm using
JavaScript and have experimented with the following:

word = 'HELLO';
mixedWord = 'HELLO';
mixedWord[0] = 'B'   does nothing

shouldn't this set the first character in mixedWord to a B? It wouldn't be
much of a word jumble game when the letter don't appear jumbled now would it.

Scott



Thu, 10 Oct 2002 03:00:00 GMT  
 string problems

Quote:

> word = 'HELLO';
> mixedWord = 'HELLO';
> mixedWord[0] = 'B'   does nothing

Your second string should be a MFString if you're trying to dereference it.
mixedWord  is a  MFString ["H", "E", "L", "L", "O"]
so  mixedWord[0] = ["B"]

You will probably have to make your word a MFString also and fill it letter by
letter.

regards
Ernest Rose



Fri, 11 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. number's to string -) tcp-ip -) scan from string problem

2. String problem

3. List with single long string problem - CW4

4. CW2.0 Vanishing variable string PROBLEM

5. CW 2.0 Concatenation of Strings PROBLEM

6. Eiffel STRING problem

7. Clarion 2 Report Mystery String problem

8. Format Into String problem

9. format string problem after installing 6.02 Update

10. Format Into String problem

11. topspeed string problem

12. Input string problem using 16h

 

 
Powered by phpBB® Forum Software