Tip

How To Handle Differences Between Platforms

We strongly encourage you to write code in your Notes/Domino applications that
works regardless of the platform on which the application runs.
As you may know, different platforms have different file delimiters that should
be accounted for when you design an application.
Windows uses a backslash (\), Unix uses a forward slash (/), and the Macintosh
uses a colon (:).
Following is a technique and code that ensures that @ Functions and LotusScript
programs work on any platform:

Database designers should create a shared, computed for display field to embed
in forms that perform path processing.
Let's call this field Delim and use it to construct paths for lookups and such.
The code for the field is

Plat := @LowerCase(platform);
@If(Plat *= "aix":"sun sparc":" hp unix":"sco
opendesktop":"solarisx86":"solaris sparc":"unixware";"/";Plat *=
"macintosh/68k":"macintosh/powerpc";":";"\\")

So that it can easily be reused, the equivalent LotusScript code should
probably be embedded in a shared utility library:

Function getDelim As String
Dim s As New notessession
Select Case s.platform
Case "UNIX" : getDelim = "/"
Case "Macintosh" : getDelim = ":"
Case Else :getDelim = "\"
End Select
End Function

This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.