problem with string
Author |
Message |
shoobyman
|
Posted: Thu Nov 09, 2006 2:43 pm Post subject: problem with string |
|
|
code: |
for i : 1 .. 3
locate (i, 1)
put "^XXXXX^"
end for
|
this is really wierd, i need the program to output
^XXXXX^
^XXXXX^
^XXXXX^
but it gives an error when i run. it works fine if i get rid of the "^", but i need to have those there, any help? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
DemonZ
|
Posted: Thu Nov 09, 2006 3:14 pm Post subject: (No subject) |
|
|
I think the problem is not with your program, but with turing. Turing has this annoying little feature that will not let you use certain characters on the keyboard (like ^ or $ and many others) so its not your fault that it wont run, blame turing. |
|
|
|
|
|
shoobyman
|
Posted: Thu Nov 09, 2006 3:46 pm Post subject: (No subject) |
|
|
oh well, it was worth a shot, i'll just get rid of the "^" |
|
|
|
|
|
Andy
|
Posted: Thu Nov 09, 2006 4:31 pm Post subject: (No subject) |
|
|
try \^ instead it should show only the ^ |
|
|
|
|
|
richcash
|
Posted: Thu Nov 09, 2006 4:37 pm Post subject: (No subject) |
|
|
You have to use Turing's escape sequence (or something like that!), which is a \.
There is also \t for tab, \n for a new line, \" for a new quotation marks, \\ for a backsplash, and many others.
[edit]Andy, beat me to it, oh well at least I told you some of the other ones.. |
|
|
|
|
|
shoobyman
|
Posted: Thu Nov 09, 2006 5:33 pm Post subject: (No subject) |
|
|
thanx everyone, it works |
|
|
|
|
|
|
|