Macintosh platform differences in LotusScript®

Language construct differences

Construct

Usage in Macintosh

ChDir

Macintosh hard drive specifications are supported; for example, "Hard drive:folder1: folder2:". DOS drive specifications, such as "C:\", are not supported.

ChDrive

Generates a run-time error unless the drive argument is the empty string (""), signifying the default drive. To change the drive, use ChDir.

Command

Command line arguments are not normally used on the Macintosh. However, if the HCL software application permits arguments, they are returned.

CurDir

Generates a run-time error unless the drive argument is defaulted or explicitly specified as the empty string (""), signifying the default drive.

CurDrive

Return the empty string (""), since there are no drive letters on the Macintosh.

Date, Date$

For reasons of security and system integrity, only the superuser can change the date on a Macintosh OS X system. Attempting to change the date under any other username will generate a run-time error. Attempting to change the date while logged in as superuser will change the date system-wide.

Declare

The Pascal calling convention for external function calls is not supported.

Dir

Ignores 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.

Environ

Returns 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.

FileLen

Files containing line terminators are smaller than on DOS platforms, because the line terminator is one character, not two.

GetFileAttr

Does not return the following attributes: ATTR_ARCHIVE, ATTR_VOLUME, ATTR_SYSTEM

Len, LenB

Strings that have been read from files containing line terminators are smaller than on DOS platforms, because the line terminator is one character, not two.

Lock

Open files can be manipulated (copied, opened, etc.).

Open

Open files can be manipulated (copied, opened, etc.).

SendKeys

Not supported. Generates a run-time error.

SetFileAttr

Generates a Permission Denied error if passed the attribute ATTR_ARCHIVE or ATTR_SYSTEM.

Time, Time$

For reasons of security and system integrity, only a superuser can change the time on a Macintosh OS X system. Attempting to change the time under any other username will generate a run-time error. Attempting to change the time while logged in as superuser will change the time system-wide.

Unlock

Open 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.