mnbujold / c415-compiler

Fall 2012 CMPUT 415 Compiler Course
0 stars 3 forks source link

chars are not compatible with 1-char arrays #30

Open James-Osgood opened 11 years ago

James-Osgood commented 11 years ago

characters are not compatible with arrays of type char with a size of 1 (starting a 1, since strings need to start at 1).

See test g01.pal.

James-Osgood commented 11 years ago

This isn't actually a bug, this is how it works!

James-Osgood commented 11 years ago

Actually, while chars are not compatible with char array[1..1]s, you can assign '~' to at any char array[1..1], since it can be interpreted as such a string.