spacer
   
   
Mailtraq - the Complete Email Server
   
spacer

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

spacer
spacer

Define()

Creates a new user-defined function which must be expressed before being used elsewhere in the script or template. Function definitions can be shared with references to external scripts. Any number of parameters can be passed to the defined function. The parameters are referred to by the placeholders $1, $2, $3, etc, within the function definition. The number of parameters provided by the function call is held in the $0 placeholder. Note that Mailtraq passes parameters by their address not by their value.

Define( function , content )

function
The name, as a string, of the function being defined
content
The function expressions. Use the Do() function to bind multiple expressions
// Defines a function which repeats the given 
// string a specified number of times. If a number is not given, the default of '5' is used.

Define("RepeatLine", Do( local_i := If($0 < 2, 5, $2), While(local_i > 0, Do( local_i := local_i - 1, $1 ++ "\n" ) ) ) ); RepeatLine( "Repeated Line", 3); RepeatLine( "Another Repeated Line")
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.