Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

While

A type of loop statement in programming that performs pre-defined tasks while in the process of doing something else. For example, in Perl, you may use code similar to the below, which is opening the file "file.txt" and while going through each of the lines in the file, printing them if they contain any letters.

open (INPUT, "<file.txt");
while (<INPUT>) {
  if ($_ =~ /[a-zA-Z]/) {
      print "$_";
  }
}
close (INPUT);

Also see: Do, Loop, Programming definitions

 

Index

Category:
Dictionary

Related Pages:
W - Definitions

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope