while

(redirected from whilst)
Also found in: Dictionary, Thesaurus, Idioms, Wikipedia.

while

(programming)
The loop construct found in nearly all procedural languages which executes one or more instructions (the "loop body") repeatedly so long as some condition evaluates to true. In contrast to a repeat loop, the loop body will not be executed at all if the condition is false on entry to the while.

For example, in C, a while loop is written

while (<expr>) <statement>;

where <expr> is any expression and <statement> is any statement, including a compound statement within braces "..".
Mentioned in ?
References in classic literature ?
The officiating priest was just finishing mass whilst D'Artagnan was looking at Bazin; he pronounced the words of the holy Sacrament and retired, giving the benediction, which was received by the kneeling communicants, to the astonishment of D'Artagnan, who recognized in the priest the coadjutor* himself, the famous Jean Francois Gondy, who at that time, having a presentiment of the part he was to play, was beginning to court popularity by almsgiving.
"You forget, sir, that you very nearly ruined forever that of my master; and that it was owing to you that he was very nearly being damned eternally for remaining a musketeer, whilst all the time his true vocation was the church."
Whilst the unknown was viewing these lights with interest, and lending an ear to the various noises, Master Cropole entered his apartment, followed by two attendants, who laid the cloth for his meal.
He resumed that dismal laugh that had so alarmed Parry; and whilst the whole household was screaming, singing, and preparing to install the travelers who had been preceded by their lackeys, he glided out by the principal entrance into the street, where the old man, who had gone to the window, lost sight of him in a moment.
The young girl, whilst the prisoner was mounting the staircase, appeared at the narrow door of her chamber, which opened on that very flight of steps; and, holding the lamp in her right hand, she at the same time lit up her pretty blooming face, surrounded by a profusion of rich wavy golden locks, whilst with her left she held her white night-dress closely over her breast, having been roused from her first slumber by the unexpected arrival of Van Baerle.
And he who does not properly manage this business will soon lose what he has acquired, and whilst he does hold it he will have endless difficulties and troubles.
It never occurred to him that by this action he was weakening himself, depriving himself of friends and of those who had thrown themselves into his lap, whilst he aggrandized the Church by adding much temporal power to the spiritual, thus giving it greater authority.
Whilst something higher than prudence is active, he is admirable; when common sense is wanted, he is an encumbrance.
There is nothing he will not be the better for knowing, were it only the wisdom of Poor Richard, or the State-Street prudence of buying by the acre to sell by the foot; or the thrift of the agriculturist, to stick a tree between whiles, because it will grow whilst he sleeps; or the prudence which consists in husbanding little strokes of the tool, little portions of time, particles of stock and small gains.
"Then," said the genius, "I tell you you have killed my son, for whilst you were throwing about the stones, my son passed by, and one of them struck him in the eye and killed him.
But whilst verdure was spread at our feet, it did not abandon our heads.
Whilst I do what is fit for me, and abstain from what is unfit, my neighbor and I shall often agree in our means, and work together for a time to one end.