char and number transform

char<>number ,often transform .

 

two functions in pascal:

ord()

char()

begin
writeln ('char 8 ASCII code is:',ord('8'));{should print 56}
writeln('number 56 represent ASCII code:',char(56));{print character'8'}
end.

 

posted @ 2021-10-07 16:50  MikeLi  阅读(24)  评论(0编辑  收藏  举报