Rimwe na rimwe, dushobora gukenera gukora kode imwe inshuro nyinshi. Mubisanzwe, imvugo ya progaramu ikorwa muburyo bukurikiranye: imvugo yambere mumikorere ibaho mbere, ikurikirwa niyakabiri, nibindi.
Indimi za porogaramu zitanga uburyo bwinshi bwo kugenzura inzira zoroshye zo gukora.
Amagambo ya Loop atwemerera gukora itangazo cyangwa itsinda ryamagambo inshuro nyinshi, kandi ibikurikira nigishushanyo mbonera cyibisobanuro mu ndimi nyinshi za porogaramu:
Imiterere
Ururimi C rutanga ubwoko bukurikira. Kanda kumurongo kugirango urebe buri bwoko burambuye.
Imiterere | ibisobanuro |
mugihe cyo kwisubiramo | Subiramo imvugo cyangwa itsinda ryamagambo mugihe ibintu byatanzwe ari ukuri. Igerageza imiterere mbere yo gukora loop host. |
Kuri Gusubiramo | Gukora urutonde rwamagambo inshuro nyinshi, koroshya kode icunga impinduka. |
kora ... mugihe cyo kwisubiramo | bisa nigihe cyatangajwe usibye ko igerageza imiterere kumpera yicyiciro. |
icyari | Koresha kimwe cyangwa byinshi bizunguruka mugihe cyigihe, kuri cyangwa gukora ... mugihe |
Itangazo ryo kugenzura
Amagambo azenguruka ahindura gahunda kode ikorwa. Hamwe na hamwe urashobora gusimbuka muri kode.
Ururimi C rutanga ibisobanuro bikurikira byo kugenzura. Kanda kumurongo kugirango urebe ibisobanuro bya buri tangazo.
kugenzura | ibisobanuro |
interuro | Kurangiza ikizunguruka cyangwahinduraitangazo, porogaramu ikomeza gukora itangazo rikurikira rikurikira loop cyangwahindura. |
komeza Itangazo | Bwira umubiri wumubiri guhagarika uruziga ako kanya hanyuma utangire ukundi. |
interuro | Hindura igenzura kumagambo yashizweho. Ariko ntugire inama yo gukoresha amagambo ya goto muri gahunda. |
umupaka utagira ingano
Niba ibintu bitigeze bibeshya, noneho ikizunguruka gihinduka umupaka utagira iherezo. Kuri cycle irashobora gukoreshwa kugirango tumenye inzinguzingo zitagira umupaka mubisanzwe. Kubera ko imwe mu mvugo eshatu zigize uruziga ntabwo ari ngombwa, urashobora gusiga imvugo isabwa ubusa kugirango ube umuzingo utagira iherezo.
urugero ruzima
Imvugo isabwa ifatwa nkukuri mugihe itabaho. Urashobora kandi gushiraho agaciro kambere nigaragaza ryiyongera, ariko muri rusange, C programmer ikunda gukoresha imiterere ya (;;) kugirango ihagararire umupaka utagira iherezo.
Inzira ya C yavuzwe haruguru ni iya Shenzhen HDV Photoelectron Technology.ONU/ itumanahoONU/ umunyabwengeONU/ fibreONU/ XPONONU/ GPONONUn'ibindi). Kuri buri mukiriya uhitamo ibyifuzo byihariye abikeneye, reka kandi ibicuruzwa byacu birusheho kugira ubwenge kandi byateye imbere.