In this video, I look at how to compare different data types in AL. I also discovered an obscure, but interesting difference between AL and C/AL, read more below the video.
![](https://www.hougaard.com/wp-content/uploads/2021/05/2021-04-09_20-26-21-1024x576.jpg)
During the video, I tried to compare a string and an integer, and that did not result in a compiler error? I was puzzled but continued. After I finished recording, I went back to the topic and discovered, that AL can parse a single character string as a Char, not as a Text.
I’m was pretty sure that C/AL didn’t do that, so going back to an ancient version of NAV with C/AL, I remembered correctly:
![](https://www.hougaard.com/wp-content/uploads/2021/05/image.png)
Doing that in AL is valid and can compile, and shows us that A is 65 (the ascii code value)
![](https://www.hougaard.com/wp-content/uploads/2021/05/image-2.png)
![](https://www.hougaard.com/wp-content/uploads/2021/05/image-3.png)
Not sure if that’s on purpose, but I dought it has any real-life impact.