spacer
   
   
Mailtraq - the Complete Email Server
   
spacer

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

spacer
spacer

For()

Iterates through each item in a list, reassigning a given variable to the current item on each iteration. For() is a looping function similar to While() and Repeat(), where the content expression is evaluated each cycle.

result := For( list , varname , content )

list
A comma separated list of items
varname
The name of the variable into which the current list item will be placed during each cycle
content
The expression to be evaluated during each loop cycle
result
A concatenation of the evaluations through every cycle

Concatenates the numeric position of the letter "b" in each of the items within "my_list" to a variable named "test"

my_list := "boat,abacus,rebound";
test := For(my_list, "item",
  Pos("b", item)
);
MessageDlg(test)

Writes a list of names and fully qualified mailbox addresses in the console, one per line, to a file named \database\users.txt

Define("Name", GetSystemVar("/mailslots/" ++ box ++ "/Description"));
a := CreateFile("users.txt");
For(GetMailboxes(), "box",
  If(GetMailboxProp(box, "Type") = "mailbox",
    Write(a, "\q" ++ Name() ++ "\q <" ++ box ++ "@" ++ LOCALHOST ++ ">")
  )
);
CloseFile(a)
spacer


Download Trial
Buy now
Screenshots
Requirements
Feature Tree
FAQs
What's new
Print this page Print this Page
Mailtraq 2.12 PDF Datasheet
Send a friend an email about Mailtraq ShareMailtraq - Email Server at Delicious Mailtraq - Mail Server at digg Mailtraq - Mail Server at FacebookMailtraq - Email Server at stumbleupon Tweet about Mailtraq

 

 

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