Error getting tags :
error 404Error getting tags :
error 404 platform | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
platform
Basics
Expander triangle
Type
Function
Syntax
the platform platform()
Introduced
1.0
Changed
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the name of the operating system Revolution is running on.
Examples

the platform
if the platform is "MacOS" then set the activatePalettes to true

Additional Comments
Expander triangle

Use the platform function to change a stack's behavior or appearance depending on the operating system.

Value:

The platform function returns one of the following strings:

MacOS any Mac OS, OS X, or Darwin system

Linux Linux for Intel or PowerPC architecture

BSD BSD UNIX (BSDI, FreeBSD)

HP-9000/700 HP-UX

SGI IRIS Silicon Graphics IRIX

IBM RS/6000 AIX

Intel SCO SCO Open DeskTop

Intel SVR4 Solaris for x86 architecture

SPARC SPARC SunOS

SPARC Solaris SPARC Solaris

Win32 Windows (any version post-3.1)

Comments:

The platform function is compiled into each version of the Revolution engine. This means that, for example, if you're developing on a Mac OS system and you build a standalone application for Linux, when you run the standalone application on a Linux system, the platform function returns "Linux".

Tip: To determine whether a Mac system is running Mac OS or OS X, use the systemVersionfunction along with the platformfunction, as in the following example:

set the itemDelimiter to "." -- versions are of the form "x.y.z"

if the platform is "MacOS" and item 1 of the systemVersion >= 10 then

answer "This is an OS X system."

end if

Changes to Revolution:

Support for Alpha Digital UNIX was removed and support for OS X was added in version 1.1.

User Comments
Expander triangle