String ---> Char 
Author Message
 String ---> Char

Hello,

how can I change/transfer a string[1] to char ?
Also, If
.
.
.

Var
        str : string[1]
        ch : char;
.
.
str := 'a';
ch := str;        <-- Here occurs an error !
.
.
.

Woh does it work ?

thanx
Sebastian



Tue, 15 Apr 2003 21:09:25 GMT  
 String ---> Char
Quote:
> Hello,

Hi

Quote:
> how can I change/transfer a string[1] to char ?

Try this:

Quote:
> Var
>         str : string[1]
>         ch : char;
> str := 'a';
> ch := str[1];        
> thanx

you are welcome :-)

--
greetings
 Lukasz Nowicki

 Queen, Taekwondo, Pascal, Wiersze, Opowiadania, FreeDOS PL mirror
 http://www.jagoda.kki.pl/
 want to see some action? www.jagoda.kki.pl/luke.mpg



Tue, 15 Apr 2003 21:12:28 GMT  
 String ---> Char
Try:  ch:=str[1];
Quote:

> Hello,

> how can I change/transfer a string[1] to char ?
> Also, If
> .
> .
> .

> Var
>         str : string[1]
>         ch : char;
> .
> .
> str := 'a';
> ch := str;        <-- Here occurs an error !
> .
> .
> .

> Woh does it work ?

> thanx
> Sebastian



Tue, 15 Apr 2003 22:57:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Weird char>string conversion

2. integer ----> char/string

3. string --> array of char

4. String manipulation > 255 chars

5. String->Char

6. char/string -> integer

7. Array of Char -> String

8. Readln( file, char, char, string[10], int );

9. String (swapping two chars in a string)

10. Delphi>>>>>>>

11. wide strings&char

12. Array of Strings and Char?

 

 
Powered by phpBB® Forum Software