Previous Topic

Next Topic

Book Contents

Book Index

Macro Functions

Macro functions are built-in functions that perform string operations on their arguments.

These functions are patterned after the identically-named functions in Basic.

Macro function references must start with a [, then the name of the function, then a (.

Function name

Description

LEFT(arg, count)

Returns the leftmost "count" characters of "arg". If arg is less than count characters long, the entire string is returned.

LEN(arg)

Returns the number of characters in "arg", as a decimal number.

MID(arg, start, count)

Returns "count" characters from "arg", starting at position "start" (where 1 is the first character). If ", count" is omitted, then the function returns the characters starting at "start" and going through the end of "arg". For example, if the original filename is ABCDE.TXT, then the value of the macro [MID([OrigName], 2, 3)] is BCD and the value of [MID([OrigName],2)] is BCDE.TXT.

RIGHT(arg, count)

Returns the rightmost "count" characters of "arg". If arg is less than count characters long, the entire string is returned.