CHAR with ARRAY OF CHAR assignment compatible ? 
Author Message
 CHAR with ARRAY OF CHAR assignment compatible ?

Quote:
Juergen Neuhoff writes:
>Hi,

>While going through the book

>"Object-Oriented Programming in Oberon-2" by M?ssenbeck,
>I couldn't find anything about assigning character-values
>to array of character, e.g.

>  TYPE
>    STRING = ARRAY 10 OF CHAR;
>  VAR
>    s : STRING;
>    c : CHAR;
>  BEGIN
>    s := c;      (* Is this allowed?  *)
>    s[0] := c;   (* Or do I have to   *)
>    s[1] := 0X;  (*   do it this way? *)

>Anyone knows the answer?

>Juergen Neuhoff

I believe that the Oberon language report states that strings of
length one are type compatible with characters.

-- ben



Thu, 28 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. CHAR with ARRAY OF CHAR assignment compatible ?

2. Object comment do: [:char | char yourself]

3. reversing lines char by char, but not the line order in a file

4. How to read line char by char?

5. CHAR and [CHAR]

6. ASCII vs. CHAR [CHAR]

7. write-char vs. display-char

8. Control chars and special chars

9. Control chars and special chars

10. Read stdin char-by-char?

11. (/= (char-int c) (char-code c))?

12. Extended-char -> Standard-char

 

 
Powered by phpBB® Forum Software