LOTUSSCRIPT LANGUAGE

Macintosh platform differences in LotusScript
Language construct differences

ConstructUsage in Macintosh
ChDirMacintosh hard drive specifications are supported; for example, "Hard drive:folder1: folder2:". DOS drive specifications, such as "C:\", are not supported.
ChDriveGenerates a run-time error unless the drive argument is the empty string (""), signifying the default drive. To change the drive, use ChDir.
CommandCommand line arguments are not normally used on the Macintosh. However, if the Lotus software application permits arguments, they are returned.
CurDirGenerates a run-time error unless the drive argument is defaulted or explicitly specified as the empty string (""), signifying the default drive.
CurDriveReturn the empty string (""), since there are no drive letters on the Macintosh.
DeclareThe Pascal calling convention for external function calls is not supported.
DirIgnores the attributes Hidden Files, and System. Does not return the directory specifications "." and "..". Returns all files for "*.*", not just those containing ".". Returns only those files ending with a period for "*.", not every file without an extension. If ATTR_VOLUME only is specified, returns the empty string. If any other attribute is specified, ATTR_VOLUME is ignored.
EnvironReturns an empty string. Generates a run-time error only if an illegal argument is passed, such as a variable number greater than the legal limit.
FileLenFiles containing line terminators are smaller than on DOS platforms, because the line terminator is one character, not two.
GetFileAttrDoes not return the following attributes: ATTR_ARCHIVE, ATTR_VOLUME, ATTR_SYSTEM
Len, LenBStrings that have been read from files containing line terminators are smaller than on DOS platforms, because the line terminator is one character, not two.
LockOpen files can be manipulated (copied, opened, etc.).
OpenOpen files can be manipulated (copied, opened, etc.).
SendKeysNot supported. Generates a run-time error.
SetFileAttrGenerates a Permission Denied error if passed the attribute ATTR_ARCHIVE or ATTR_SYSTEM.
UnlockOpen files can be manipulated (copied, opened, etc.).

File system differences

Macintosh-style pathnames are assumed unless the pathname contains a backslash. If the pathname contains a backslash, then a DOS-style pathname is assumed.

There are no drive letters on the Macintosh. All devices reside under the root directory. If you use a pathname containing a drive letter, LotusScript may return an error. For the %Include directive, this is a compiler error; for all other uses, this is a run-time error.

Files are not limited to DOS naming rules (8-character name plus 3-character extension).

The Macintosh does not store a default directory for each drive. It maintains only one current directory, not one per drive as in DOS. Drive names can be up to 27 characters in length. This limitation affects ChDir, ChDrive, and CurDir.

The Macintosh does not recognize the directory specifications "." and "..". This limitation affects the Dir function.

The Macintosh does not use the file system attributes Volume, Archive, and System. This limitation affects Dir, GetFileAttr, and SetFileAttr.

Macintosh uses the carriage return (ASCII 13) character as the line terminator. Other platforms use other characters. This difference means that files and strings manipulated with the same LotusScript code but executed on different platforms may have different sizes. For instance, the UNIX platform uses a single character (linefeed) as the line terminator, so text files written on that platform have equal length to those written on Macintosh. Since the Windows platform uses a two-character sequence, text files written there are larger than text files written on Macintosh, given identical source code. This difference affects FileLen, Len, LenB, and LenBP.

Macintosh permits files that are open for reading to be manipulated (copied, opened, etc.) by another application. A file opened for output by LotusScript is locked; other applications cannot open or copy the file, but can move or rename it. Lock and Unlock work only on shared volumes; the file being locked must be on a server or file sharing must be turned on for a local volume ("Sharing Setup" on the control panel). This difference affects Open, Lock, and Unlock.

Other differences

Function aliasing with ordinal numbers (using the Alias clause in the Declare statement) is not possible on the Macintosh PC.

There are no system environment variables on the Macintosh. This limitation affects Environ.

See Also