Answer the question
In order to leave comments, you need to log in
How does pascal code listing work, or rather one condition?
In this post, a listing of the implementation of the Shannon-Fano algorithm in pascal was given. I just can't understand this little condition. if (a<>' ') then
Why are we comparing an array and a character constant equal to space?
Can someone explain how it works, and ideally, show an example in another language in C/C++/C#?
I would be very grateful.
Answer the question
In order to leave comments, you need to log in
I would venture to suggest that in Pascal, as in C / C ++, strings are arrays of characters, so comparing a character array with a string is quite correct.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question