While begizta
From Wikipedia, the free encyclopedia
From Wikipedia, the free encyclopedia
While begizta programazio egituratuan lengoaia gehienek erabiltzen duten begizta bat da, baldintza bat betetzen den bitartean bere edukia exekutatzea helburu duena.
Pseudokodez idatzitako kodea honakoa liteke:
(baldintza) betetzen den bitartean (begiztaren edukia) begiztaren itxiera
Lengoaia batzuetan boolearrak ez diren balioak ere erabil daitezke baldintza bezala; esate baterako, 0 bueltatzen badu baldintza betetzen ez dela kontsideratzen da, eta betetzen dela beste kasu guztietan.
C programazio lengoaian idatzitako adibidea:
int Tekla = 0; while (Tekla == 0) { Tekla = readkey(); /* Tekla bat irakurtzen du */ }
Adibide honetan programa itxaroten geldituko da erabiltzaileak tekla bat sakatu arte; orduan, aurrera jarraituko du.
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.