String Manipulation
Author |
Message |
Flikerator
|
Posted: Sat Mar 05, 2005 12:52 am Post subject: String Manipulation |
|
|
If I have a string that is 9 characters long;
code: |
var name : string := "Flikerato"
|
and I have a string array and I want to isolate each letter how would I do that?
code: |
var letter : array 1 .. 9 of string
|
if I did this;
code: |
put letter (1)
put letter (2)
put letter (3)
put letter (4)
put letter (5)
put letter (6)
put letter (7)
put letter (8)
put letter (9)
|
Then I should get;
EDIT - The goal is not to get the name sideways, I need to use each letter in some sort of advanced math calculation (Yah I said MATH, each letter represents something, Flikerato is an example so I can get help.) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Sat Mar 05, 2005 8:03 am Post subject: (No subject) |
|
|
Something like this?
Turing: |
var text := "Flikerato"
var letter : array 1 .. length (text ) of string
for i : 1 .. upper (letter )
letter (i ) := text (i )
end for
for i : 1 .. upper (letter )
put letter (i ) ..
end for
|
|
|
|
|
|
|
Flikerator
|
Posted: Sat Mar 05, 2005 12:01 pm Post subject: (No subject) |
|
|
That is exactly what I wanted thank you. Now I can finish that question... |
|
|
|
|
|
|
|