Mailtraq - the Complete Email Server
   

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search

Repeat()

This function is very similar to the While() function, except that the continuation expression is evaluated at the end of each loop iteration. The loop is terminated when this expression returns true. This is similar to the familiar repeat...until construct found in many languages.

result := Repeat( content , continuation )

continuation
An expression which is evaluated after each iteration and which terminates the loop when it evaluates to "TRUE"
content
An expression which is evaluated each iteration with the result being appended to the function output
result
The concatenation of the result from each cycle

Write lines to text file until a loop terminating condition is met

max_count := 10;
loop_count := 1;
a := CreateFile("myfile.txt");
Repeat(
  Do(
    Write(a, "This is line number " ++ loop_count),
    loop_count := loop_count + 1
  ),
  loop_count >= max_count
);
CloseFile(a)
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video

 

   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.