Мы с Вами уже рассмотрели типы данных, которые позволяют хранить и обрабатывать целые числа (integer) и дробные числа (real). Теперь рассмотрим тип данных, позволяющий хранить и обрабатывать различные символы. Символы – это все буквы и значки, которые мы можем увидеть на клавиатуре. Для того чтобы ввести в программу символьные переменные необходимо указать для них символьный тип данных Char.
Строка №4. Записываем переменную «X» и указываем для нее тип данных Char. Char – тип данных, который позволяет хранить символы. В данном случае в переменную «X» мы будем записывать не какие-то числа, а символы.
В строке №7 мы присвоили переменной «X» значение латинской буквы L. Сам символ, который необходимо записать в переменную, обязательно берется в апострофы. Напомню, что когда мы присваиваем переменной числовое значение, то число в апострофы не берется.
В строке №8 выводим на экран значение, которое мы присвоили переменной X, т.е. фактически на экран выведется буква L.
Строка №9. Функция Ord, преобразовывает букву в ее числовой код. Коды всех букв и символов можно посмотреть в кодовой таблице ASCII, которая приведена ниже. ASCII (American Standard Code for Information Interchange) - международный стандарт, принятый для кодирования текстовой информации. По этой таблице, любые символы имеют свой уникальный числовой код. В нашем примере переменной N присваивается значение функции Ord (L) т.е. (код) буквы «L» (по таблице ASCII код буквы «L» - 76).
В строке №10 выводим значение переменной «N» (т.е. числовой код буквы «L») на экран.
Строка №11. Функция Chr противоположна функции Ord. Эта функция будет преобразовывать числовой код символа в сам символ. В переменной N у нас записан код буквы «L». C помощью функции Chr мы преобразуем этот код в букву и запишем её в символьную переменную X. Таким образом, в строке №12 на экран выведется буква «L»


Дополнение к материалу.
В приведенном выше примере функция Ord возвращает в качестве значения код переменной «X», которой присвоено значение латинской буквы «L». После записи функции Ord переменная «X» стоит в круглых скобках (строка №9). Вместо записи переменной можно напрямую записать символ, код которого необходимо получить. Этот символ необходимо заключить не только в круглые скобки, но и в апострофы. Таким образом программу можно записать так:
Кодовая таблица ASCII.


Комментарии
Например, у клавиши Enter код =13
А нижняя часть таблицы ASCII (после 127 символа) — это уже не ASCII, а какая-то русскоязычная кодовая страница на её основе (коих, вообще говоря, вагон и маленькая тележка).
Нужно чтобы в программе пользователь ввёл да или нет, а после этого должна выполняться программа , зависящая от выбранного ответа
Типа если на вопрос ответил да, то выполняется одно действие, если нет-другое
Program tree;
Var c: char;
n: integer;
{...}
Begin
Writeln ('*вопрос*');
Readln (c);
N := Ord (C);
If n = 89
then {один случай}
else {второй случай};
end.
Если нужно проверить, если ли в слове какой-то определённый символ или буква, вам сюда - http://programmado.ru/55-stroki-v-paskale-tip-string.html , ибо нужен строковый тип данных string, char же работает только с единичным символом.
Если допустить, что вам нужна проверка на то, не встречается ли в слове определённая буква, то вот, накропал на досуге
PROGRAM Check;
VAR X, C: string;
i, L: integer;
begin
WRITELN ('Введите слово для проверки');
READLN (X);
WRITELN ('Введите проверочный символ');
READLN (C);
L := Length (X);
For i := 1 to L do
begin
If C = X[1] then WRITELN ('Соответствие');
Delete (X, 1, 1);
end;
end.
PROGRAM Check;
VAR X, C: string;
i, L: integer;
begin
WRITELN ('Введите слово для проверки'); { вводим проверяемое слово }
READLN (X);
WRITELN ('Введите проверочный символ'); { наличие которого в слове и будет определяться }
READLN (C);
L := Length (X); { функция определения количества символов с строке (в данном случае - в слове) }
For i := 1 to L do { детерминированн ый цикл или цикл с заранее известным количеством итераций (повторений). В данном случае, число повторений будет равно L. Тело этого цикла заключено в операторные скобки (begin...end). Таким образом, слово "соответствие" выводится на экран столько раз, сколько было, собственно, соответствий }
begin
If C = X[1] then WRITELN ('Соответствие');
Delete (X, 1, 1); { удаляем первый символ }
end;
end.
Also, thank you for permitting me to comment!
Have a look at my site ... live
draw sdy lotto: https://pafi-pohuwato.org/
together cheapest doxycycline without prescrtiption: https://meneercasino.com/slot-reviews/wild-rockets consulting a healthcare professional.
in Viagra. Viagra is a brand name for the medication containing sildenafil.
Both are used to treat erectile dysfunction, but sildenafil is the generic version while Viagra is the brand name version.
These druigs are of great help. They help you in achieving erections by
inhibiting the action of a certain enzyme in your body. This enzyme penis enlargement is it real: https://meneercasino.com/online-casino-tips/de-bank-breken-in-het-casino-kan-dat-echt phosphodiestera se 5 or PDE 5.
cbd gummies: https://meneercasino.com/online-casino-tips/online-casino-snelle-uitbetaling.
quietly dispose of a packet of Kamagra - a sex drug containing
sildenafil, the same active ingredient as Viagra
- that had been found in the hotel room shortly
after Warne's body was.
Also visit my blog: penis enlargement traction device: https://meneercasino.com/online-casino-reviews/bingoal
My blog; penis enlargement surgery
cost in australia: https://meneercasino.com/slot-reviews/beach
Blood pressure measures the smount of pressure on the wall of?
Are digital blood pressure monitors accurate? What
is the medical term meaning idiopathic high blood pressure?
my website :: penis injections for enlargement: https://meneercasino.com/online-casino-reviews/kansino
to
Feel free to visit my homepage: cipla sildenafil: https://meneercasino.com/slot-reviews/aliens
proportion we keep up a correspondence more about your article on AOL?
I need a specialist on this area to solve my problem. Maybe that's you!
Taking a look forward to see you.
my web site ... Live Draw Sdy Lotto: https://fivemmlo.shop/
This drug is used to treat erectile dysfunction, a medical
term for having trouble with erection.
Feel free to visit my web site penis enlargement surgery photos: https://meneercasino.com/slot-reviews/sticky-bandits
I'm having some small security issues with my latest website and I would like to find something more safeguarded.
Do you have any recommendations?
Also visit my webpage - =%3Ca%20href=ht tps://syairhk1. store/%3EFroum% 20Syair%20HK%3C /a%3E%3Cmeta%20 http-equiv=refr esh%20content=0 ;url=https://sy airhk1.store/%2 0/%3E]Froum Syair HK: http://Https%3A%2F%25Evolv.E.L.U.PC
playboy cricketer, known for his love of gambling and partying, died
of 'natural causes' and that he suffered from congenital heart weakness.
Stop by my page; where can i buy doxycycline
online: https://meneercasino.com/over-meneer-casino
pill
Review my site dapoxetine sildenafil online: https://meneercasino.com/slot-reviews/mega-moolah
Nevertheless Viagra is most likely the perfect treatment for
Erectile Dysfunction around the world.
My blog stiff bull herbal coffee: https://meneercasino.com/online-casino-tips/royal-derby-holland-casino
my web blog :: cialis weight loss: https://meneercasino.com/slot-reviews/divine-dreams
and Viagra together buy
doxycycline hyclate 100mg without a rx: https://meneercasino.com/slot-reviews/epic-joker consulting a
healthcare professional.
professional.
Also visit my blog post penis enlargement surgery
success rate: https://meneercasino.com/pagina-niet-gevonden
I will make certain to bookmmark your bblog and will come back frrom now on. I want to encourage one to conginue your great posts, have a nice holiday
weekend!
My webpage Ernestina: https://9ightout.com/
they seeded this scaffold with endothelial cells - the main cells that line blood vessels
Visit my web site; lisinopril
oral: https://meneercasino.com/over-meneer-casino/privacy
It's on a totally different subject but it has pretty much
the same layout and design. Great choice of colors!
Feel free to visit my page: Paitosgp: https://paitosgp.lol/
my blog sildenafil citrate 50mg
tablets: https://meneercasino.com/slot-reviews/mega-fortune-dreams
ability to understand the nature and consequences of the charges, consult with counsel in a rational manner, and participate
in his defense "with a reasonable degree of rational understanding,' ' the.
Here is my homepage :: viagra y alcohol consecuencias: https://meneercasino.com/slot-reviews/leprechauns-luck-cash-collect
healthcare professional.
Also visit my web page - penis enlargement remedy tom candow reccomended
vitamins: https://meneercasino.com/slot-reviews/super-flip
blood pressure
Feel free to visit my blog post - viagra pill: https://meneercasino.com/slot-reviews/holmes-and-the-stolen-stones
my homepage; penis
enlargement in al ain: https://meneercasino.com/slot-reviews/gold-king
equivalent: https://meneercasino.com/online-casino-tips/blackjack-strategie-beginners together without consulting a healthcare professional.
a healthcare professional.
Feel free to visit my site; penis enlargement surgery give you bigger errections: https://meneercasino.com/slot-reviews/starburst
cosmetic filler from Naruschka Henriques, a listed mental health nurse prescriber online, as she has
done annually for the past seven years.
my page ... viagra
lozenges: https://meneercasino.com/online-casino-reviews/leovegas
Have a look at my webpage ... cialis
what does it do: https://meneercasino.com/online-casino-tips/wat-is-de-beste-strategie-voor-caribbean-stud-poker
This checks the amount of prostate-specif ic antigen - a protein produced by the prostate gland.
My site; viagra commercial 2024: https://meneercasino.com/online-casino-tips/blackjack-holland-casino-strategie
procedure that removes the foreskin from the penis.
Here is my blog post: viagra 20 mg price: https://meneercasino.com/slot-reviews/hyper-strike
a healthcare professional.
together without consulting a healthcare professional.
Also visit my homepage - penis enlargement doctors near me: https://meneercasino.com/gratis-gokken
Look into my web-site ... penis
enlargement surgery costs: https://meneercasino.com/slot-reviews/mega-fortune-dreams
healthcare professional.
the time and actual effort to generate a top notch article… but what can I say…
I hesitate a whole lot and never manage to get nearly anything done.
My site - Live
Draw SGP: https://livedrawsgppools.info
which contains tons of valuable information, thanks for providing such statistics.
Review my website :: Livedrawsdy: https://livedrawsdy.digital/
Feel free to visit my page - viagra dosage by weight: https://meneercasino.com/slot-reviews/south-park
(Er, we must have missed all those belly laughs
on Four Corners).
a surgical procedure that removes the foreskin from the penis enlargement bible
works ?: https://meneercasino.com/slot-reviews/mighty-arthur.
What web host are you the usage of? Can I get your affiliate hyperlink on your host?
I desire my site loaded up as fast as yours lol
my web page ... Live Draw Sdy: https://livedrawsdy.info
'He's trolling the trolls,' I am told.
Take a look at my page; ziphealth cialis: https://meneercasino.com/auteur/alieke-hoogenboom
blood pressure? Blood pressure measures the smount of pressure on the
wall of? Are digital blood pressure monitors accurate?
What is the medical term meaning idiopathic high blood pressure?
Visit my site :: viagra y alcohol consecuencias: https://meneercasino.com/slot-reviews/narcos
price: https://meneercasino.com/online-casino-tips/holland-casino-reserveren in regural base is not good.
Feel free to surf to my blog :: penis enlargement bible reviews: https://meneercasino.com/slot-reviews/monopoly-bring-the-house-down
be from the US told how he gave his pregnant nurse sister
a list of nasty medical terms that could double as girls' names.
my web site: penis
enlargement for real: https://meneercasino.com/online-casino-tips/10-hoogste-jackpots-holland-casino
Sara Haines, Ana Navarro, Sunny Hostin, and Alyssa Farah Griffin.
my website: lisinopril brand: https://jeux.ca/casino-argent-reel/
I have read this post and if I could I desire to suggest you few interesting things or tips.
Maybe you can write next articles referring to this article.
I desire to read even more things about it!
my site - Livedrawchina: https://www.jobkoffer.de/firmeneintrag-loeschen?nid=25604&element=https://livedrawchina23.shop/
Подробнее - вызов врача нарколога на дом: https://narkolog-na-dom-moskva13.ru/
Подробнее - вывод из запоя в стационаре: https://vivod-iz-zapoya-sochi23.ru/
It is also used recreationally.
surgical procedure that removes the foreskin from the penis.
My webpage; viagra zegin: https://meneercasino.com/online-casino-reviews/toto-casino
erectile disorders. These druigs are of great help. They help you in achieving erections by inhibiting the
action of a certain enzyme penis enlargement in ayurveda: https://meneercasino.com/slot-reviews/robin-of-sherwood your body.
This enzyme is phosphodiestera se 5 or PDE 5.
be pаy a quick visit thiѕ web siute and be
up to date alⅼ the time.
My ԝeb blog :: blɑϲk
and white Fine аrt photography : female figure drawing: http://Www.Testing.Sbm.pw/out/not-known-factual-statements-about-fine-art-photography/
The clearness in your post is simply excellent and i can assume you are an expert on this subject.
Well with your permission let me to grab your feed to keep updated with forthcoming post.
Thanks a million and please continue the gratifying work.
Also visit my web site - สล็อตเว็บตรง: https://bhgchinesebistro.com/
about this, what if you typed a catchier post title?
I ain't saying your content is not solid., but suppose you added something that makes people
desire more? I mean Уроки Паскаль is kinda plain. You should
glance at Yahoo's front page and note how they create news titles to grab viewers
to open the links. You might add a related video or a related picture or two to get people excited about everything've got to say.
Just my opinion, it would bring your posts a little bit more interesting.
Also visit my web blog - Paitosdy: https://togel1.xyz/
sexual problems. They also provide coupon discounts and next-day delivery.
My web page: viagra vision changes: https://meneercasino.com/online-casino-tips/wat-is-kleine-serie-bij-roulette
I appreciate you for posting when you have the opportunity, Guess I will just bookmark this site.
my webpage Paitohk: https://stephanieleach.com/?page_id=1560&hs_redirect_17871=https://terjituhk.shop/
factor to take into accout of. I say to you, I certainly get irked whilst other folks think about concerns that they plainly
don't understand about. You managed to hit the nail upon the highest and outlined out the entire thing without having side effect , other people
can take a signal. Will probably be again to get more.
Thanks
Also visit my site - Paitosgp: https://togel1.site/
Check out my web site - penis enlargement exercises with pictures: https://meneercasino.com/online-casino-tips/wat-is-bancontact
What stimulant is also referred to as crystal or
crank and leaves the user feeling confused and shaky and paranoid when it wears off?
Can you take a hormone pill to give you a bigger butt?
Feel free to surf to my web page - viagra japan reddit: https://meneercasino.com/slot-reviews/bar-bar-black-sheep
erectile dysfunction.
Here is my web site; viagra logo: https://winz.io/
penis enlargement before and after photos: https://meneercasino.com/slot-reviews/sparks
Viagra together without consulting a healthcare professional.
Here is my web page: penis enlargement cost uk: https://meneercasino.com/online-casino-tips/holland-casino-entreeverbod-bezoekbeperking
best treatments for male and female sexual problems.
They also provide coupon discounts and next-day delivery.
Also visit my web site buy doxycycline monohydrate: https://meneercasino.com/slot-reviews/hugo
Is white round pill gpi a325? How many 25mg Xanax equals
2mg Xanax? Can you enlist in the french foreign legion with a marijuana charge?
Also visit my website ... viagra triangle chicago: https://meneercasino.com/online-casino-tips/4-dingen-die-je-gratis-kunt-krijgen-in-holland-casino
and leave you feeling bloated, while high-fiber foods like broccoli,
cabbage, cauliflower, and beans can cause gas - great for gut
health, but not ideal for date night.
my site viagra
max 99: https://finance.yahoo.com/news/best-offshore-sportsbooks-why-bovada-144300694.html
Finally I've found something that helped me. Kudos!
Here is my homepage - GBWhatsApp Pro: https://www.discogs.com/user/9aleh.app
‘He stripped off and laid on the bed for a
back rub with oils. He was very much at ease and comfortable… We were both so
shocked when we found out later that he had
died.'
Feel free to surf to my website ... penis enlargement in tijuana: https://meneercasino.com/slot-reviews/epic-joker
Feel free to surf to my homepage ... penis enlargement herbal oil: https://meneercasino.com/slot-reviews/white-king
Great website, keep it up!
Feel free to surf to my web site GBWhatsApp APK Gratis: https://images.google.mv/url?q=https%3A%2F%2Fwww.dpreview.com%2Fforums%2Fthreads%2Fdownload-whatsapp-plus-new-update.4838586%2F
My web site: doxycycline 50mg tab: https://meneercasino.com/slot-reviews/game-of-thrones
consequences of the charges, consult with counsel in a rational manner, and participate in his defense "with a reasonable degree of rational understanding,' ' the.
Also visit my web page ... viagra 4 tablet price: https://meneercasino.com/slot-reviews/super-flip
you design this website yourself or did you hire someone to do iit for you?
Plz answer back as I'm looking to design mmy own blog and would like to find
out where u got this from. thanks
My sitte slot 777 Link: https://www.Abgodnessmoto.co.uk/index.php?page=user&action=pub_profile&id=24595&item_type=active&per_page=16
Also visit my page :: penis enlargement surgery
usa: https://meneercasino.com/slot-reviews/drill-that-gold
Ознакомиться с деталями - вывод из запоя в стационаре: https://vyvod-iz-zapoya-v-anape1.ru/
has, I can disclose, taken to social media to attack critics in the most personal
way. 'He's trolling the trolls,' I am told.
Here is my site; viagra
tablet uses: https://meneercasino.com/slot-reviews/spinata-grande
in usa: https://meneercasino.com/online-casino-tips/live-casino.
6 months: https://meneercasino.com/online-casino-tips/roulette-regels-uitleg affects the child.
this first-line treatment of erectile dysfunction', said Dr
Miguel Olivencia, a researcher at Complutense
University and co-author of the study.
My webpage: viagra indication: https://meneercasino.com/slot-reviews/hotline
my web page: lisinopril brand: https://meneercasino.com/slot-reviews/white-king
Despite years of exhaustive research costing millions, science has failed to find a
cure or drug to prevent it.
Feel free to visit my blog post :: viagra generic online: https://meneercasino.com/slot-reviews/tornado-farm-escape
Also visit my website where to buy doxycycline over the counter: https://meneercasino.com/slot-reviews/joker-millions